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

Update Dockerfile.jvm #939

Closed
wants to merge 20 commits into from
Closed

Conversation

hurzelpurzel
Copy link

The Dockerfile didn't run with Kaniko on gitlab-ci. The separated chown did solve the problem.
I think Quarkus should be as compatible as possible and not only work with docker an builder.

Check list:

Your pull request:

  • targets the development branch
  • uses the 999-SNAPSHOT version of Quarkus
  • has tests (mvn clean test)
  • works in native (mvn clean package -Pnative)
  • has native tests (mvn clean verify -Pnative)
  • makes sure the associated guide must not be updated
  • links the guide update pull request (if needed)
  • updates or creates the README.md file (with build and run instructions)
  • for new quickstart, is located in the directory component-quickstart
  • for new quickstart, is added to the root pom.xml and README.md

gsmet and others added 20 commits July 29, 2021 11:06
…nache-quickstart

It doesn't need to use the maven-docker-plugin anymore

(cherry picked from commit 58de52d)
(cherry picked from commit 2e1b010)
(cherry picked from commit 14218b3)
The Dockerfile didn't run with Kaniko with gitlab-ci. The separated chown did solve the problem
@cescoffier
Copy link
Member

What's the error displayed by Kaniko?
The change looks good, but we would need to change the template used to generate the docker file.

@hurzelpurzel
Copy link
Author

hurzelpurzel commented Sep 19, 2021

error building image: error building stage: failed to get files used from context: failed to get fileinfo for /builds/playground108/logproducer/target/quarkus-app/lib: lstat /builds/playground108/logproducer/target/quarkus-app/lib: no such file or directory

As far as I understood, the --chown flag was introduced with docker-ce version 17.09 (see: https://stackoverflow.com/questions/44766665/how-do-i-docker-copy-as-non-root). It might be the case, that some builder like kaniko or moby does not support it.

Might is connected to
GoogleContainerTools/kaniko#1603

@cescoffier
Copy link
Member

Looking at the issue, it seems to be a kaniko limitation. Hopefully, it will be fixed soon.
Your approach works but introduces an additional layer, which, as the top layer, will be executed on every build. However, if there is no other choice, let's go for it.

@cescoffier
Copy link
Member

The PR does not target the right branch, please update to use the development branch.

@hurzelpurzel hurzelpurzel changed the base branch from main to development September 26, 2021 19:44
@hurzelpurzel
Copy link
Author

hurzelpurzel commented Sep 26, 2021

switch to #943

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

Successfully merging this pull request may close these issues.

8 participants