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

Documentation 'Using a multi-stage Docker build' with Gradle needs updating #24599

Closed
klemen-df opened this issue Mar 29, 2022 · 6 comments
Closed
Labels
area/gradle Gradle area/housekeeping Issue type for generalized tasks not related to bugs or enhancements

Comments

@klemen-df
Copy link
Contributor

klemen-df commented Mar 29, 2022

Description

We are building a multistage docker according to this ('Sample Dockerfile for building with Gradle') guide here https://quarkus.io/guides/building-native-image#multistage-docker

There are some issues in this guide :

COPY --chown=quarkus:quarkus /code/gradle

What are we copying here?

FROM quay.io/quarkus/ubi-quarkus-native-image:21.3.1-java11 AS build

Should/can we update to java17?

USER quarkus

Original image 'ubi-quarkus-native-image' is already run as user 'quarkus', why duplicate?

RUN gradle -b /code/build.gradle buildNative

Gradle is not in PATH so we should do ./gradle

We are already in code folder (workdir) so we can omit the '/code/'

Parameter 'buildNative' is deprecated ('The 'buildNative' task has been deprecated in favor of 'build -Dquarkus.package.type=native''). When we run with the new command it has some problems with missing xargs package.

Implementation ideas

No response

@klemen-df klemen-df added the area/housekeeping Issue type for generalized tasks not related to bugs or enhancements label Mar 29, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Mar 29, 2022

/cc @glefloch, @quarkusio/devtools

@quarkus-bot quarkus-bot bot added the area/gradle Gradle label Mar 29, 2022
@geoand
Copy link
Contributor

geoand commented Mar 29, 2022

@KlemenDanfoss thanks for reporting!

Since you seem to have already identified the various issues, mind sending a Pull Request where you will update https://github.com/quarkusio/quarkus/blob/main/docs/src/main/asciidoc/building-native-image.adoc?

@glefloch
Copy link
Member

@KlemenDanfoss are you interested into pushing the fix? otherwise, I can to it.

@klemen-df
Copy link
Contributor Author

@KlemenDanfoss are you interested into pushing the fix? otherwise, I can to it.

Yes, I will.

@klemen-df
Copy link
Contributor Author

@glefloch , please check #24969

@glefloch
Copy link
Member

glefloch commented May 3, 2022

closed by #24969

@glefloch glefloch closed this as completed May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gradle Gradle area/housekeeping Issue type for generalized tasks not related to bugs or enhancements
Projects
None yet
Development

No branches or pull requests

3 participants