docker multistage work 100%

This commit is contained in:
Valentin CZERYBA 2022-10-15 18:22:13 +02:00
parent c944982d19
commit 5e77c865e5
2 changed files with 24 additions and 3 deletions

View File

@ -0,0 +1,24 @@
####
# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode
#
# Build the image with:
#
# docker build -f src/main/docker/Dockerfile.multistage -t quarkus/rest-json .
#
# Then run the container using:
#
# docker run -i --rm -p 8080:8080 quarkus/rest-json
#
###
FROM quay.io/quarkus/centos-quarkus-maven:21.3.0-java11 AS build
COPY ./pom.xml ./pom.xml
COPY ./src ./src
RUN mvn -Pnative package
FROM registry.access.redhat.com/ubi8/ubi-minimal
WORKDIR /work/
COPY --from=build /project/target/*-runner /work/application
RUN chmod 775 /work
EXPOSE 8080
CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]

View File

@ -1,8 +1,5 @@
smallrye.jwt.sign.key.location=privateKey.pem smallrye.jwt.sign.key.location=privateKey.pem
quarkus.native.additional-build-args =-H:ResourceConfigurationFiles=resources-config.json
mp.jwt.verify.publickey.location=publicKey.pem mp.jwt.verify.publickey.location=publicKey.pem
mp.jwt.verify.issuer=https://example.com/issuer mp.jwt.verify.issuer=https://example.com/issuer
mp.jwt.token.header=Cookie mp.jwt.token.header=Cookie