-
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
NativeImageBuildStep fails if 'docker' is not installed #10984
Comments
After review other issues opened regarding 'podman', I found the #10637 where I could see the following argument to compile:
That parameter is not described in the Quarkus - Container Images reference. Using that parameter in my command then I reproduce the same issue described in #10637. That parameter should be added in the documentation to allow developers to set up the container runtime to use (docker | podman). |
Thanks for reporting! You are correct that the docs are currently a little confusing... Basically |
The idea is to help users understand the difference between -Dquarkus.native.container-build=true and -Dquarkus.native.container-build=true Fixes: quarkusio#10984
The idea is to help users understand the difference between -Dquarkus.native.container-build=true and -Dquarkus.native.container-build=true Fixes: quarkusio#10984
The idea is to help users understand the difference between -Dquarkus.native.container-build=true and -Dquarkus.native.container-build=true Fixes: quarkusio#10984 Co-authored-by: Guillaume Smet <[email protected]>
The idea is to help users understand the difference between -Dquarkus.native.container-build=true and -Dquarkus.container-image.build=true Fixes: quarkusio#10984 Co-authored-by: Guillaume Smet <[email protected]>
Improve the building native image doc
Describe the bug
On a Fedora 32 fresh installation where 'docker' command is not installed because 'podman' is only available to run containers, I found the following exception when compiled a simple HelloWorld project:
`$ mvn clean package -Pnative -Dquarkus.native.container-build=true
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< org.acme:code-with-quarkus >---------------------
[INFO] Building code-with-quarkus 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- quarkus-maven-plugin:1.6.1.Final:build (default) @ code-with-quarkus ---
[INFO] [org.jboss.threads] JBoss Threads version 3.1.1.Final
[INFO] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Building native image source jar: /home/rmarting/Workspaces/ws-crs/quarkus-sample/target/code-with-quarkus-1.0.0-SNAPSHOT-native-image-source-jar/code-with-quarkus-1.0.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Building native image from /home/rmarting/Workspaces/ws-crs/quarkus-sample/target/code-with-quarkus-1.0.0-SNAPSHOT-native-image-source-jar/code-with-quarkus-1.0.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Checking image status quay.io/quarkus/ubi-quarkus-native-image:20.1.0-java11
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.124 s
[INFO] Finished at: 2020-07-27T12:57:40+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.6.1.Final:build (default) on project code-with-quarkus: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: java.lang.RuntimeException: Failed to pull builder image quay.io/quarkus/ubi-quarkus-native-image:20.1.0-java11
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:134)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[ERROR] at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:932)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR] at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:834)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:479)
[ERROR] Caused by: java.io.IOException: Cannot run program "docker": error=2, No such file or directory
[ERROR] at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
[ERROR] at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
[ERROR] at io.quarkus.deployment.util.ProcessUtil.launchProcess(ProcessUtil.java:37)
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:131)
[ERROR] ... 12 more
[ERROR] Caused by: java.io.IOException: error=2, No such file or directory
[ERROR] at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
[ERROR] at java.base/java.lang.ProcessImpl.(ProcessImpl.java:340)
[ERROR] at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:271)
[ERROR] at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
[ERROR] ... 15 more
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
`
I made an alias between docker and podman as:
alias docker=podman
However with the same failure.
Expected behavior
(Describe the expected behavior clearly and concisely.)
Actual behavior
(Describe the actual behavior clearly and concisely.)
To Reproduce
Steps to reproduce the behavior:
mvn clean package -Pnative -Dquarkus.native.container-build=true
Environment :
uname -a
orver
:Linux redhat 5.7.9-200.fc32.x86_64 #1 SMP Fri Jul 17 16:23:37 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
java -version
:openjdk version "11.0.8" 2020-07-14 OpenJDK Runtime Environment 18.9 (build 11.0.8+10) OpenJDK 64-Bit Server VM 18.9 (build 11.0.8+10, mixed mode, sharing)
GraalVM Updater 20.1.0
1.6.1.Final
mvnw --version
orgradlew --version
):Maven home: /usr/share/maven Java version: 11.0.8, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-11-openjdk-11.0.8.10-2.fc32.x86_64 Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "5.7.9-200.fc32.x86_64", arch: "amd64", family: "unix"
The text was updated successfully, but these errors were encountered: