Skip to content

Commit

Permalink
Merge pull request #15591 from jonathan-meier/doc_native_remote_conta…
Browse files Browse the repository at this point in the history
…iner_build

Add documentation for containerized native builds on remote daemons
  • Loading branch information
gsmet authored Mar 12, 2021
2 parents 2b7d1f0 + 1ca0829 commit 6643c47
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/src/main/asciidoc/building-native-image.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,18 @@ If you want to explicitely select the container runtime, you can do it with:
These are normal Quarkus config properties, so if you always want to build in a container
it is recommended you add these to your `application.properties` in order to avoid specifying them every time.
====

[TIP]
====
If you see the following invalid path error for your application JAR when trying to create a native executable using a container build, even though your JAR was built successfully, you're most likely using a remote daemon for your container runtime.
----
Error: Invalid Path entry getting-started-1.0.0-SNAPSHOT-runner.jar
Caused by: java.nio.file.NoSuchFileException: /project/getting-started-1.0.0-SNAPSHOT-runner.jar
----
In this case, use the parameter `-Dquarkus.native.remote-container-build=true` instead of `-Dquarkus.native.container-build=true`.
The reason for this is that the local build driver invoked through `-Dquarkus.native.container-build=true` uses volume mounts to make the JAR available in the build container, but volume mounts do not work with remote daemons. The remote container build driver copies the necessary files instead of mounting them. Note that even though the remote driver also works with local daemons, the local driver should be preferred in the local case because mounting is usually more performant than copying.
====

[TIP]
Expand Down

0 comments on commit 6643c47

Please sign in to comment.