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.
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:
When I run this image, it just sits there - no output:
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 touser.clj
wherewatch-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.