Skip to content
Snippets Groups Projects
Commit 2e5c4bbf authored by OZGCloud's avatar OZGCloud
Browse files

OZG-2651 native build

parent b7d97541
No related branches found
No related tags found
No related merge requests found
####
# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode.
#
# Before building the container image run:
#
# ./mvnw package -Pnative
#
# Then, build the image with:
#
# docker build -f src/main/docker/Dockerfile.native -t quarkus/user-manager .
#
# Then run the container using:
#
# docker run -i --rm -p 8080:8080 quarkus/user-manager
#
###
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.5
WORKDIR /work/
RUN chown 1001 /work \
&& chmod "g+rwX" /work \
&& chown 1001:root /work
COPY --chown=1001:root target/*-runner /work/application
EXPOSE 8080
USER 1001
CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]
...@@ -81,7 +81,7 @@ pipeline { ...@@ -81,7 +81,7 @@ pipeline {
withCredentials([usernamePassword(credentialsId: 'jenkins-docker-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) { withCredentials([usernamePassword(credentialsId: 'jenkins-docker-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) {
sh 'docker login docker.ozg-sh.de -u ${USER} -p ${PASSWORD}' sh 'docker login docker.ozg-sh.de -u ${USER} -p ${PASSWORD}'
sh 'docker build -f src/main/docker/Dockerfile.jvm -t docker.ozg-sh.de/user-manager:build-latest .' sh 'docker build -f Dockerfile.native -t docker.ozg-sh.de/user-manager:build-latest .'
} }
} }
} }
...@@ -151,7 +151,7 @@ pipeline { ...@@ -151,7 +151,7 @@ pipeline {
failure { failure {
script { script {
if (env.BRANCH_NAME == 'master' || env.BRANCH_NAME == 'release') { if (env.BRANCH_NAME == 'master' || env.BRANCH_NAME == 'release') {
sendFailureMessage() //sendFailureMessage()
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment