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

spring-native-image : multistage Docker build fail on windows #262

Open
chyrak opened this issue Mar 22, 2024 · 0 comments
Open

spring-native-image : multistage Docker build fail on windows #262

chyrak opened this issue Mar 22, 2024 · 0 comments

Comments

@chyrak
Copy link

chyrak commented Mar 22, 2024

finse@sebfin MINGW64 ~/dev/graalvm
$ git clone https://github.com/graalvm/graalvm-demos.git
Cloning into 'graalvm-demos'...
remote: Enumerating objects: 7172, done.
remote: Counting objects: 100% (1550/1550), done.
remote: Compressing objects: 100% (287/287), done.
remote: Total 7172 (delta 1252), reused 1409 (delta 1193), pack-reused 5622
Receiving objects: 100% (7172/7172), 80.85 MiB | 5.82 MiB/s, done.
Resolving deltas: 100% (3429/3429), done.

finse@sebfin MINGW64 ~/dev/graalvm
$ ls
graalvm-demos/

finse@sebfin MINGW64 ~/dev/graalvm
$ cd graalvm-demos/

finse@sebfin MINGW64 ~/dev/graalvm/graalvm-demos (master)
$ cd spring-native-image/

finse@sebfin MINGW64 ~/dev/graalvm/graalvm-demos/spring-native-image (master)
$ docker build -f Dockerfiles/Dockerfile -t jibber-benchmark:native.0.0.1-SNAPSHOT .
#0 building with "default" instance using docker driver

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 576B done
#1 DONE 0.0s

#2 [internal] load metadata for container-registry.oracle.com/graalvm/native-image:21-ol8
#2 DONE 0.1s

#3 [internal] load metadata for container-registry.oracle.com/os/oraclelinux:8-slim
#3 DONE 0.1s

#4 [internal] load .dockerignore
#4 transferring context: 2B done
#4 DONE 0.0s

#5 [builder 1/4] FROM container-registry.oracle.com/graalvm/native-image:21-ol8@sha256:2ea1251d96a7a61511f75a8a5f16a6ad4dc398c6d09c00f5026e5dab2a00264b
#5 DONE 0.0s

#6 [stage-1 1/2] FROM container-registry.oracle.com/os/oraclelinux:8-slim@sha256:df6c940e0f1640029471cdb22fb1295aa16022a875c64c92381022d2c277d302
#6 CACHED

#7 [internal] load build context
#7 transferring context: 1.55kB done
#7 DONE 0.0s

#8 [builder 2/4] WORKDIR /build
#8 CACHED

#9 [builder 3/4] COPY . /build
#9 CACHED

#10 [builder 4/4] RUN ./mvnw --no-transfer-progress native:compile -Pnative
#10 0.193 /bin/sh: ./mvnw: /bin/sh^M: bad interpreter: No such file or directory
#10 ERROR: process "/bin/sh -c ./mvnw --no-transfer-progress native:compile -Pnative" did not complete successfully: exit code: 126
------
 > [builder 4/4] RUN ./mvnw --no-transfer-progress native:compile -Pnative:
0.193 /bin/sh: ./mvnw: /bin/sh^M: bad interpreter: No such file or directory
------
Dockerfile:11
--------------------
   9 |
  10 |     # Build
  11 | >>> RUN ./mvnw --no-transfer-progress native:compile -Pnative
  12 |
  13 |     # The deployment Image
--------------------
ERROR: failed to solve: process "/bin/sh -c ./mvnw --no-transfer-progress native:compile -Pnative" did not complete successfully: exit code: 126

View build details: docker-desktop://dashboard/build/default/default/ldvqvvgb85f4oo4u5kxs3ow5b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant