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

fix: docker image requires static compile + certificates #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
file: ./src/main/docker/Dockerfile.native
file: ./src/main/docker/Dockerfile.native-micro
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
97 changes: 0 additions & 97 deletions src/main/docker/Dockerfile.jvm

This file was deleted.

93 changes: 0 additions & 93 deletions src/main/docker/Dockerfile.legacy-jar

This file was deleted.

29 changes: 3 additions & 26 deletions src/main/docker/Dockerfile.native-micro
Original file line number Diff line number Diff line change
@@ -1,30 +1,7 @@
####
# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode.
# It uses a micro base image, tuned for Quarkus native executables.
# It reduces the size of the resulting container image.
# Check https://quarkus.io/guides/quarkus-runtime-base-image for further information about this image.
#
# Before building the container image run:
#
# ./gradlew build -Dquarkus.package.type=native
#
# Then, build the image with:
#
# docker build -f src/main/docker/Dockerfile.native-micro -t quarkus/qualityannotate .
#
# Then run the container using:
#
# docker run -i --rm -p 8080:8080 quarkus/qualityannotate
#
###
FROM quay.io/quarkus/quarkus-micro-image:2.0
WORKDIR /work/
RUN chown 1001 /work \
&& chmod "g+rwX" /work \
&& chown 1001:root /work
COPY --chown=1001:root build/*-runner /work/application
COPY --chown=1001:root build/resources/main/application.yml /config/application.yml
COPY --chown=1001:root build/*-runner /qualityannotate

EXPOSE 8080
USER 1001

ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0"]
ENTRYPOINT ["/qualityannotate"]
5 changes: 4 additions & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,7 @@ github:
# you can ignore these
quarkus:
native:
additional-build-args: "--gc=epsilon"
# ,--libc=musl unfortunately not working in the default container
additional-build-args: "--gc=epsilon,--static"
compression:
level: 5
Loading