Commit be4108c6 authored by Christian Hofer's avatar Christian Hofer Committed by Georg Mittendorfer

instructions to build a piri docker image

parent bf1f0ae6
Pipeline #29671248 passed with stage
in 3 minutes and 6 seconds
# Build artifact
mvn clean package -DskipTests
# Instructions using docker CLI
## Build image
docker build -t piri .
## Start image in container
docker run -v ${PWD}/ -p 80:8080 piri
## Tag and push image to registry (
# login if not already authenticated
docker login --username=yourhubusername
docker tag piri chrisss404/piri:latest
docker push chrisss404/piri
# Instructions using docker compose
## Build image
docker-compose build
## Start image in container
docker-compose up
## Tag and push image to registry (
docker-compose push
FROM openjdk:8-jre-alpine
# runtime dependency for tomcat native libraries
RUN apk add --no-cache tomcat-native && \
rm -rf /var/cache/apk/*
# vendor files
COPY target/unpacked-jar/BOOT-INF/lib /app/BOOT-INF/lib
COPY target/unpacked-jar/org /app/org
# app files
COPY target/unpacked-jar/META-INF /app/META-INF
COPY target/unpacked-jar/BOOT-INF/classes /app/BOOT-INF/classes
ENTRYPOINT ["/usr/bin/java", "", "-XX:+UnlockExperimentalVMOptions", \
"-XX:+UseCGroupMemoryLimitForHeap", "-XX:MaxRAMFraction=1", "-cp", "/app", \
version: '2'
build: .
image: chrisss404/piri:latest
- 80:8080
- ./
......@@ -70,6 +70,31 @@
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment