Skip to content

Commit 19abe23

Browse files
committed
fix: docker image requires static compile + certificates
1 parent 6761b85 commit 19abe23

2 files changed

Lines changed: 5 additions & 18 deletions

File tree

src/main/docker/Dockerfile.native

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,12 @@
1-
####
2-
# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode.
3-
#
4-
# Before building the container image run:
5-
#
6-
# ./gradlew build -Dquarkus.package.type=native
7-
#
8-
# Then, build the image with:
9-
#
10-
# docker build -f src/main/docker/Dockerfile.native -t quarkus/qualityannotate .
11-
#
12-
# Then run the container using:
13-
#
14-
# docker run -i --rm -p 8080:8080 quarkus/qualityannotate
15-
#
16-
###
1+
FROM alpine:3 as certs
2+
RUN apk --update add ca-certificates
3+
174
FROM scratch
185
WORKDIR /
6+
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
197
COPY --chown=1001:root build/resources/main/application.yml /config/application.yml
208
COPY --chown=1001:root build/*-runner /qualityannotate
219

22-
EXPOSE 8080
2310
USER 1001
2411

2512
ENTRYPOINT ["/qualityannotate"]

src/main/resources/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ github:
3333
# you can ignore these
3434
quarkus:
3535
native:
36-
additional-build-args: "--gc=epsilon"
36+
additional-build-args: "--gc=epsilon, --static, --libc=musl"

0 commit comments

Comments
 (0)