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

Don't add the "--rm" option to "docker run" command, of native-image, too early #4897

Merged
merged 1 commit into from
Oct 27, 2019
Merged

Don't add the "--rm" option to "docker run" command, of native-image, too early #4897

merged 1 commit into from
Oct 27, 2019

Conversation

jaikiran
Copy link
Member

The commit here fixes an issue where the --rm option to docker run command during native image generation, is added too early. This causes issues when the native image is passed addtional containerRuntimeOptions for example the below one:

<containerRuntimeOptions>--name=hello</containerRuntimeOptions>

This ends up generating a command of the form:

docker run -v quarkus/integration-tests/infinispan-embedded/target/quarkus-integration-test-xxx-999-SNAPSHOT-native-image-source-jar:/project:z --rm --name=hello quay.io/quarkus/ubi-quarkus-native-image:19.2.0.1 ...

notice that after --rm, the additional container runtime option(s) get added instead of the image name.

This commit fixes that issue and the above command now gets correctly created as:

docker run -v quarkus/integration-tests/infinispan-embedded/target/quarkus-integration-test-xxx-999-SNAPSHOT-native-image-source-jar:/project:z --name=hello --rm quay.io/quarkus/ubi-quarkus-native-image:19.2.0.1

@jaikiran jaikiran added kind/bug Something isn't working area/core labels Oct 27, 2019
@geoand
Copy link
Contributor

geoand commented Oct 27, 2019

Thanks @jaikiran!

@geoand geoand merged commit 69ade9d into quarkusio:master Oct 27, 2019
@geoand geoand added this to the 0.27.0 milestone Oct 27, 2019
@jaikiran jaikiran deleted the fix-native-image-options branch October 27, 2019 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core kind/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants