question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fail to build native function with -Dnative-image.docker-build

See original GitHub issue

Describe the bug Running mvn package -Pnative -Dnative-image.docker-build=true on the code generated by quarkus-amazon-lambda-archetype fails with:

docker: Error response from daemon: invalid volume specification: 'C:\Users\Elegie\springyme_quarkus\lambdatest\target\lambdatest-1.0-SNAPSHOT-native-image-source-jar:/project:z'.

Expected behavior The packaging works and a function.zip is available in the target.

Actual behavior The packaging fails with the following:

[INFO] [io.quarkus.deployment.QuarkusAugmentor] Beginning quarkus augmentation
[INFO] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Building native image source jar: C:\Users\Elegie\springyme_quarkus\lambdatest\target\lambdatest-1.0-SNAPSHOT-native-image-source-jar\lambdatest-1.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Building native image from C:\Users\Elegie\springyme_quarkus\lambdatest\target\lambdatest-1.0-SNAPSHOT-native-image-source-jar\lambdatest-1.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on OpenJDK 64-Bit Server VM
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] docker run -v C:\Users\Elegie\springyme_quarkus\lambdatest\target\lambdatest-1.0-SNAPSHOT-native-image-source-jar:/project:z --rm quay.io/quarkus/ubi-quarkus-native-image:19.2.1 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -jar lambdatest-1.0-SNAPSHOT-runner.jar -J-Djava.util.concurrent.ForkJoinPool.common.parallelism=1 -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http -H:-JNI -H:-UseServiceLoaderFeature -H:+StackTrace lambdatest-1.0-SNAPSHOT-runner
docker: Error response from daemon: invalid volume specification: 'C:\Users\Elegie\springyme_quarkus\lambdatest\target\lambdatest-1.0-SNAPSHOT-native-image-source-jar:/project:z'.

To Reproduce Steps to reproduce the behavior:

  1. mvn archetype:generate -DarchetypeGroupId=io.quarkus -DarchetypeArtifactId=quarkus-amazon-lambda-archetype -DarchetypeVersion=1.0.0.CR1
  2. Go the app folder, then mvn package -Pnative -Dnative-image.docker-build=true.

Environment (please complete the following information):

  • Output of uname -a or ver: Microsoft Windows [version 10.0.18362.418]
  • Output of java -version: openjdk version “11.0.1” 2018-10-16 OpenJDK Runtime Environment 18.9 (build 11.0.1+13) OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)

Additional context I have Windows Family, which requires me to use the Docker Toolbox. The problem seems to come from the way volumes are defined in the command line, with the Windows format (C:\...\) being wrong, but unfortunately I have no idea on how to fix it (I’m beginner-level at Docker).

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
oztimpowercommented, Nov 12, 2019

@Elegie the Amazon Lambda docs have been updated in #5377 to show you how to test local with the SAM CLI which runs in Docker (given your comment about not having an AWS Account)

I use Gradle so have to hand construct the function.zip, so I am curious if this will work for you, and yes also on Mac 😃

1reaction
Elegiecommented, Nov 11, 2019

Hi @machi1990, thanks for your comment. I’ll be opening a PR by the end of the week then, if that’s alright. Cheers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Building a Native Executable - Quarkus
Building a native executable requires using a distribution of GraalVM. ... for the native image to start before automatically failing the native tests....
Read more >
Spring Native - Building Docker image fails or stopped?
I'm trying to make Docker image and run the image in minikube. I ran ./gradlew clean bootBuildImage But it seems like the process...
Read more >
Fix GraalVM Native Image Build Issues - Simply-How.com
1. Introduction 2. Getting started 3. Build-time errors
Read more >
Compiling your Quarkus applications to native executables
Building a native executable with Red Hat build of Quarkus covers: ... Creating a container image using the OpenShift Docker build strategy.
Read more >
Native Support in Spring Boot 3.0.0-M5
Build failure during the generation of the native image can have various root causes. Please use the usual support channel such as Gitter...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found