1
0
mirror of https://github.com/octoleo/plantuml-server.git synced 2024-12-22 08:48:54 +00:00
plantuml-server/Dockerfile.tomcat
2022-11-07 13:00:28 +01:00

34 lines
1008 B
Docker

FROM maven:3-jdk-11-slim AS builder
COPY pom.xml /app/
COPY src/main /app/src/main/
WORKDIR /app
RUN mvn --batch-mode --define java.net.useSystemProxies=true -Dapache-jsp.scope=compile package
########################################################################################
FROM tomcat:10-jdk11-openjdk-slim
RUN apt-get update && \
apt-get install -y --no-install-recommends \
fonts-noto-cjk \
graphviz \
&& \
rm -rf /var/lib/apt/lists/*
COPY docker-entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENV BASE_URL=ROOT \
WEBAPP_PATH=$CATALINA_HOME/webapps
RUN rm -rf $WEBAPP_PATH && \
mkdir -p $WEBAPP_PATH
COPY --from=builder /app/target/plantuml.war $WEBAPP_PATH/ROOT.war
ENTRYPOINT ["/entrypoint.sh"]
CMD ["catalina.sh", "run"]
# Openshift https://docs.openshift.com/container-platform/4.9/openshift_images/create-images.html#images-create-guide-openshift_create-images
USER root
RUN chgrp -R 0 $CATALINA_HOME && chmod -R g=u $CATALINA_HOME