Skip to content
Snippets Groups Projects

Update to Quarkus 2.1.0 from Quarkus 0.28

Closed Martin Lowe requested to merge github/fork/autumnfound/malowe/master/17 into master
15 files
+ 151
291
Compare changes
  • Side-by-side
  • Inline
Files
15
@@ -14,31 +14,61 @@
# docker run -i --rm -p 8080:8080 -v <fullpath to dir>/secrets:/run/secrets quarkus/geoip-client-jvm
#
###
FROM fabric8/java-alpine-openjdk8-jre
####
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
#
# Before building the container image run:
#
# ./mvnw package
#
# Then, build the image with:
#
# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/getting-started-jvm .
#
# Then run the container using:
#
# docker run -i --rm -p 8080:8080 quarkus/getting-started-jvm
#
# If you want to include the debug port into your docker image
# you will have to expose the debug port (default 5005) like this : EXPOSE 8080 5050
#
# Then run the container using :
#
# docker run -i --rm -p 8080:8080 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/getting-started-jvm
#
###
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3
WORKDIR /deployments/scripts
ARG JAVA_PACKAGE=java-11-openjdk-headless
ARG RUN_JAVA_VERSION=1.3.8
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'
# Install java and the run-java script
# Also set up permissions for user `1001`
RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \
&& microdnf update \
&& microdnf clean all \
&& mkdir /deployments \
&& chown 1001 /deployments \
&& chmod "g+rwX" /deployments \
&& chown 1001:root /deployments \
&& curl https://repo1.maven.org/maven2/io/fabric8/run-java-sh/${RUN_JAVA_VERSION}/run-java-sh-${RUN_JAVA_VERSION}-sh.sh -o /deployments/run-java.sh \
&& chown 1001 /deployments/run-java.sh \
&& chmod 540 /deployments/run-java.sh \
&& echo "securerandom.source=file:/dev/urandom" >> /etc/alternatives/jre/lib/security/java.security
# Configure the JAVA_OPTIONS, you can add -XshowSettings:vm to also display the heap size.
ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager \
-Xmx512m \
-Declipse.maxmind.root=/maxmind"
# We make four distinct layers so if there are application changes the library layers can be re-used
COPY --chown=1001 target/quarkus-app/lib/ /deployments/lib/
COPY --chown=1001 target/quarkus-app/*.jar /deployments/
COPY --chown=1001 target/quarkus-app/app/ /deployments/app/
COPY --chown=1001 target/quarkus-app/quarkus/ /deployments/quarkus/
# CUSTOM - added to pull in maxmind
COPY maxmind/ /maxmind/
ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 \
-Djava.util.logging.manager=org.jboss.logmanager.LogManager \
-Xmx512m \
-Declipse.subnet.ipv4.path=/maxmind/db/GeoLite2-Country-Blocks-IPv4.csv \
-Declipse.subnet.ipv6.path=/maxmind/db/GeoLite2-Country-Blocks-IPv6.csv \
-Declipse.subnet.countries.path=/maxmind/db/GeoLite2-Country-Locations-en.csv \
-Dmaxmind.database.root=/maxmind/bin \
-Dmaxmind.database.country.file=GeoLite2-Country.mmdb \
-Dmaxmind.database.city.file=GeoLite2-City.mmdb"
ENV AB_ENABLED=jmx_exporter
COPY target/lib/* /deployments/lib/
COPY target/*-runner.jar /deployments/app.jar
EXPOSE 8080
# run with user 1001 and be prepared for be 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
USER 1001
ENTRYPOINT [ "/deployments/run-java.sh" ]
ENTRYPOINT [ "/deployments/run-java.sh" ]
\ No newline at end of file
Loading