From 9486032d8b10a265a16f84c2f9e511f4c6f18ee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klemen=20Kobeti=C4=8D?= Date: Fri, 15 Apr 2022 15:41:46 +0200 Subject: [PATCH] Use gradlew in native image docs --- docs/src/main/asciidoc/building-native-image.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/src/main/asciidoc/building-native-image.adoc b/docs/src/main/asciidoc/building-native-image.adoc index 4f9114a929bad..9289b6a9a3ec4 100644 --- a/docs/src/main/asciidoc/building-native-image.adoc +++ b/docs/src/main/asciidoc/building-native-image.adoc @@ -566,6 +566,8 @@ Sample Dockerfile for building with Gradle: ---- ## Stage 1 : build with maven builder image with native capabilities FROM quay.io/quarkus/ubi-quarkus-native-image:{graalvm-flavor} AS build +USER root +RUN microdnf install findutils COPY --chown=quarkus:quarkus gradlew /code/gradlew COPY --chown=quarkus:quarkus gradle /code/gradle COPY --chown=quarkus:quarkus build.gradle /code/ @@ -574,7 +576,7 @@ COPY --chown=quarkus:quarkus gradle.properties /code/ USER quarkus WORKDIR /code COPY src /code/src -RUN gradle -b /code/build.gradle buildNative +RUN ./gradlew build -Dquarkus.package.type=native ## Stage 2 : create the docker final image FROM quay.io/quarkus/quarkus-micro-image:1.0