-
Notifications
You must be signed in to change notification settings - Fork 76
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
Unable to build on linux (Volume in Dockerfile) #164
Comments
So, if I understand correctly, the Quarkus documentation should be updated to not use /project but /code. Am I right? |
Yeah, any directory except USER root
WORKDIR /code
RUN chown quarkus:quarkus -R /code
USER quarkus fix which looks more like a hack |
cescoffier
added a commit
to cescoffier/quarkus
that referenced
this issue
Aug 16, 2021
…content get erased between the two stages. It works on Mac for an unknown reason, but fails on Linux. See quarkusio/quarkus-images#164.
I've opened a PR in the Quarkus doc. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
i am unable to build a quarkus application with these base images as the build directory
/project
is defined as a volume here:quarkus-images/quarkus-native-image.yaml
Lines 36 to 38 in 9a01a65
and here:
quarkus-images/quarkus-mandrel.yaml
Lines 36 to 38 in 9a01a65
I am using the sample maven Dockerfile from the docs
The error is thrown in the final image as it tries to copy the compiled native application:
If I am doing an ls after the maven native build, all generated files are missing:
This is because any data that is written in the Dockerfile will be discarded in the next layer because the directory is specified as a volume: https://docs.docker.com/engine/reference/builder/#notes-about-specifying-volumes
The build is working fine on a mac though, I think Docker is doing some magic in the vm so it works there, but this is not in spec and does not work native with linux.
I would like to try and fix it myself, but I don't know exactely how your github actions work and i can't really test it in a fork :/
EDIT:
If i change the build directory to a directory outside the
/project
volume everything is working fine (But this should be fixed in the base images):Regards,
Fabian
The text was updated successfully, but these errors were encountered: