Skip to content

Commit

Permalink
Make release through github actions.
Browse files Browse the repository at this point in the history
Signed-off-by: Dennis Labordus <[email protected]>
  • Loading branch information
Dennis Labordus committed Jul 12, 2021
1 parent 6a2508c commit 64aa521
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
13 changes: 7 additions & 6 deletions app/src/main/docker/Dockerfile.jvm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Before building the container image run:
#
# ./gradlew build
# ./mvnw package
#
# Then, build the image with:
#
Expand All @@ -21,7 +21,7 @@
# docker run -i --rm -p 8080:8080 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/app-jvm
#
###
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4

ARG JAVA_PACKAGE=java-11-openjdk-headless
ARG RUN_JAVA_VERSION=1.3.8
Expand All @@ -43,12 +43,13 @@ RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \
# 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"
# We make four distinct layers so if there are application changes the library layers can be re-used
COPY --chown=1001 build/quarkus-app/lib/ /deployments/lib/
COPY --chown=1001 build/quarkus-app/*.jar /deployments/
COPY --chown=1001 build/quarkus-app/app/ /deployments/app/
COPY --chown=1001 build/quarkus-app/quarkus/ /deployments/quarkus/
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/

EXPOSE 8080
USER 1001

ENTRYPOINT [ "/deployments/run-java.sh" ]

8 changes: 4 additions & 4 deletions app/src/main/docker/Dockerfile.legacy-jar
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Before building the container image run:
#
# ./gradlew build -Dquarkus.package.type=legacy-jar
# ./mvnw package -Dquarkus.package.type=legacy-jar
#
# Then, build the image with:
#
Expand All @@ -21,7 +21,7 @@
# docker run -i --rm -p 8080:8080 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/app-legacy-jar
#
###
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4

ARG JAVA_PACKAGE=java-11-openjdk-headless
ARG RUN_JAVA_VERSION=1.3.8
Expand All @@ -42,8 +42,8 @@ RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \

# 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"
COPY build/lib/* /deployments/lib/
COPY build/*-runner.jar /deployments/app.jar
COPY target/lib/* /deployments/lib/
COPY target/*-runner.jar /deployments/app.jar

EXPOSE 8080
USER 1001
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/docker/Dockerfile.native
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Before building the container image run:
#
# ./gradlew build -Dquarkus.package.type=native
# ./mvnw package -Pnative
#
# Then, build the image with:
#
Expand All @@ -14,12 +14,12 @@
# docker run -i --rm -p 8080:8080 quarkus/app
#
###
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4
WORKDIR /work/
RUN chown 1001 /work \
&& chmod "g+rwX" /work \
&& chown 1001:root /work
COPY --chown=1001:root build/*-runner /work/application
COPY --chown=1001:root target/*-runner /work/application

EXPOSE 8080
USER 1001
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/docker/Dockerfile.native-distroless
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Before building the container image run:
#
# ./gradlew build -Dquarkus.package.type=native
# ./mvnw package -Pnative
#
# Then, build the image with:
#
Expand All @@ -15,7 +15,7 @@
#
###
FROM quay.io/quarkus/quarkus-distroless-image:1.0
COPY build/*-runner /application
COPY target/*-runner /application

EXPOSE 8080
USER nonroot
Expand Down

0 comments on commit 64aa521

Please sign in to comment.