Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run test alias under docker #132

Open
rfb opened this issue Feb 20, 2024 · 0 comments
Open

Can't run test alias under docker #132

rfb opened this issue Feb 20, 2024 · 0 comments

Comments

@rfb
Copy link

rfb commented Feb 20, 2024

My goal is to run the test alias as part of a CI/CD routine in Google Cloud Build. My approach is to create a new target in the supplied Dockerfile called test:

FROM clojure:openjdk-17 AS test

WORKDIR /
COPY . /

RUN clj -P -M:test

ENTRYPOINT exec clj -M:test

When I run this image, it just sits there - no output:

$ docker build --target test -t test .
[+] Building 35.8s (8/8) FINISHED
....

$ docker run --rm test

While debugging, I removed env/dev/resources/logback.xml and comparing the output with my non-containerized version. I was able to see where the non-containerized version was enumerating source directories. This lead me to user.clj where watch-deps is setup. When I comment this line out, the test alias will runs in the container.

I'm assuming whatever mechanism watch-deps is using to monitor filesystem changes is failing in Docker's overlayfs? Also, it appears this isn't an issue is not present if I mount the project source as a volume.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant