diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2020-01-12 15:42:02 +0100 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2020-01-12 15:42:02 +0100 |
commit | 4c5847bffd0401e62a3f2beaeba8c0cb887359ce (patch) | |
tree | 127d56260008d7cb2f243c6b2e61010cc301bdd5 /src/main/docker | |
parent | e00c80770d867a49979eb86724cd6c94f7a8d2e2 (diff) |
Import fresh Quarkus project.
Change-Id: I05fa5dd499cdca04adee9afbef9f83b3afd8fe0f
Diffstat (limited to 'src/main/docker')
-rw-r--r-- | src/main/docker/Dockerfile.jvm | 34 | ||||
-rw-r--r-- | src/main/docker/Dockerfile.native | 22 |
2 files changed, 56 insertions, 0 deletions
diff --git a/src/main/docker/Dockerfile.jvm b/src/main/docker/Dockerfile.jvm new file mode 100644 index 0000000..c7ff48c --- /dev/null +++ b/src/main/docker/Dockerfile.jvm @@ -0,0 +1,34 @@ +#### +# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode +# +# Before building the docker image run: +# +# mvn package +# +# Then, build the image with: +# +# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/mulkcms2-jvm . +# +# Then run the container using: +# +# docker run -i --rm -p 8080:8080 quarkus/mulkcms2-jvm +# +### +FROM fabric8/java-alpine-openjdk8-jre:1.6.5 +ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" +ENV AB_ENABLED=jmx_exporter + +# Be prepared for running in OpenShift too +RUN adduser -G root --no-create-home --disabled-password 1001 \ + && chown -R 1001 /deployments \ + && chmod -R "g+rwX" /deployments \ + && chown -R 1001:root /deployments + +COPY build/lib/* /deployments/lib/ +COPY build/*-runner.jar /deployments/app.jar +EXPOSE 8080 + +# run with user 1001 +USER 1001 + +ENTRYPOINT [ "/deployments/run-java.sh" ]
\ No newline at end of file diff --git a/src/main/docker/Dockerfile.native b/src/main/docker/Dockerfile.native new file mode 100644 index 0000000..1cb12dd --- /dev/null +++ b/src/main/docker/Dockerfile.native @@ -0,0 +1,22 @@ +#### +# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode +# +# Before building the docker image run: +# +# mvn package -Pnative -Dquarkus.native.container-build=true +# +# Then, build the image with: +# +# docker build -f src/main/docker/Dockerfile.native -t quarkus/mulkcms2 . +# +# Then run the container using: +# +# docker run -i --rm -p 8080:8080 quarkus/mulkcms2 +# +### +FROM registry.access.redhat.com/ubi8/ubi-minimal +WORKDIR /work/ +COPY build/*-runner /work/application +RUN chmod 775 /work +EXPOSE 8080 +CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]
\ No newline at end of file |