-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Custom native container runtime options are overwritten #17223
Labels
Milestone
Comments
I disagree with the label |
zakkak
added a commit
to zakkak/quarkus
that referenced
this issue
Dec 7, 2021
Forces `quarkus.native.container-runtime-options` to come after the base arguments added by Quarkus to allow users to override the latter, e.g. to override the --user option. Closes: quarkusio#17223
gsmet
pushed a commit
to gsmet/quarkus
that referenced
this issue
Dec 13, 2021
Forces `quarkus.native.container-runtime-options` to come after the base arguments added by Quarkus to allow users to override the latter, e.g. to override the --user option. Closes: quarkusio#17223 (cherry picked from commit 9dcaafa)
gsmet
pushed a commit
to gsmet/quarkus
that referenced
this issue
Dec 14, 2021
Forces `quarkus.native.container-runtime-options` to come after the base arguments added by Quarkus to allow users to override the latter, e.g. to override the --user option. Closes: quarkusio#17223 (cherry picked from commit 9dcaafa)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When building a quarkus application as a native image with version 1.12.1 and above it fails due to a change in the container runtime option order. This change happened in PR 15288.
Up to and with 1.12.0 custom native container runtime options were placed after default options e.g.
resulted in
docker run --env LANG=C --user 1000:1000 -uroot:root --rm [..]
. This results in usingroot
in the docker as later arguments overwrite previous ones.(Note: this bugs occurs on Linux and therefore the --user 1000:1000 is added with 1000:1000 being the current system user)
After 1.12.1 (actually it was introduced in 1.13.0 and backported to 1.12.1) custom options are placed before default options. E.g. the same native container runtime options as above resulted in
docker run --env LANG=C -uroot:root --user 1000:1000 --rm [..]
with1000
being used as the user in the container.Expected behavior
Custom native container runtime options to overwrite the ones given by the system (default options).
Actual behavior
Custom native container runtime options do not have precedence.
Proposed change
NativeImageBuildLocalContainerRunner.java change to:
To reestablish the same logic as it was in 1.12.0:
To Reproduce
Steps to reproduce the behavior:
Configuration
Environment
Output of
uname -a
orver
➜ uname -a Linux Colter 5.8.0-50-generic #56~20.04.1-Ubuntu SMP Mon Apr 12 21:46:35 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
GraalVM version (if different from Java)
The one configured by quarkus.
Quarkus version or git rev
As explained above.
Build tool (ie. output of
mvnw --version
orgradlew --version
)Additional context
I'd volunteer to fix this bug.
The text was updated successfully, but these errors were encountered: