Skip to content

Commit

Permalink
Fixes #163 - Rework Dockerfile (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnriem committed Apr 12, 2024
1 parent 799d7b4 commit 4a104b3
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,14 @@ RUN export PATH=$PATH:/usr/local/apache-maven-$MAVEN_VERSION/bin && \
cd /root && \
mvn --no-transfer-progress -DskipTests -DskipITs clean install

#
# Download the Piranha Web Profile distribution
#
FROM eclipse-temurin:21 AS dist
ENV PIRANHA_VERSION 24.3.0
WORKDIR /root
RUN curl -O https://repo1.maven.org/maven2/cloud/piranha/dist/piranha-dist-webprofile/$PIRANHA_VERSION/piranha-dist-webprofile-$PIRANHA_VERSION.jar && \
mv piranha-dist-webprofile-$PIRANHA_VERSION.jar piranha-dist-webprofile.jar

#
# Run the application
#
FROM eclipse-temurin:21
RUN useradd -m piranha
FROM ghcr.io/piranhacloud/webprofile:24.3.0
EXPOSE 8080
COPY --from=builder /root/target/piranha-start.war /home/piranha/ROOT.war
COPY --from=dist /root/piranha-dist-webprofile.jar /home/piranha/piranha-dist-webprofile.jar
WORKDIR /home/piranha
USER root
RUN chown -R piranha:piranha *
USER piranha
CMD ["java", "-jar", "piranha-dist-webprofile.jar", "--war-file", "ROOT.war"]

0 comments on commit 4a104b3

Please sign in to comment.