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

Add 'gradle' to sample Dockerfile for building with Gradle #24850

Merged
merged 1 commit into from
Apr 9, 2022

Conversation

VanillaSpoon
Copy link
Contributor

Added 'gradle' to sample Dockerfile for building with Gradle, in building-native-image.adoc.

#24727


Testing:
Follow the guide from building native image @ Sample Dockerfile for building with Gradle:
Using this dockerfile :)

## Stage 1 : build with maven builder image with native capabilities
FROM quay.io/quarkus/ubi-quarkus-native-image:21.3.1-java11 AS build
COPY --chown=quarkus:quarkus gradlew /code/gradlew
COPY --chown=quarkus:quarkus gradle /code/gradle
COPY --chown=quarkus:quarkus build.gradle /code/
COPY --chown=quarkus:quarkus settings.gradle /code/
COPY --chown=quarkus:quarkus gradle.properties /code/
USER quarkus
WORKDIR /code
COPY src /code/src
RUN gradle -b /code/build.gradle buildNative

## Stage 2 : create the docker final image
FROM quay.io/quarkus/quarkus-micro-image:1.0
WORKDIR /work/
COPY --from=build /code/build/*-runner /work/application
RUN chmod 775 /work
EXPOSE 8080
CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]

@quarkus-bot
Copy link

quarkus-bot bot commented Apr 9, 2022

Thanks for your pull request!

The title of your pull request does not follow our editorial rules. Could you have a look?

  • title should preferably start with an uppercase character (if it makes sense!)
  • title should not start with chore/docs/feat/fix/refactor but be a proper sentence

This message is automatically generated by a bot.

@VanillaSpoon VanillaSpoon changed the title docs: add 'gradle' to sample Dockerfile for building with Gradle Add 'gradle' to sample Dockerfile for building with Gradle Apr 9, 2022
@gastaldi gastaldi merged commit f0aa06e into quarkusio:main Apr 9, 2022
@quarkus-bot quarkus-bot bot added this to the 2.9 - main milestone Apr 9, 2022
@gsmet gsmet modified the milestones: 2.9 - main, 2.8.1.Final Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants