diff --git a/src/main/docker/Dockerfile.centos b/src/main/docker/Dockerfile.centos new file mode 100644 index 0000000..7be530d --- /dev/null +++ b/src/main/docker/Dockerfile.centos @@ -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"] \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 872a30c..6b68cd9 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,8 +1,5 @@ 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.issuer=https://example.com/issuer mp.jwt.token.header=Cookie