2021-10-11 15:33:30 +00:00
|
|
|
FROM maven:3-jdk-11-slim AS builder
|
2017-10-20 18:20:26 +00:00
|
|
|
|
|
|
|
COPY pom.xml /app/
|
2021-10-11 15:33:30 +00:00
|
|
|
COPY src/main /app/src/main/
|
2017-10-20 18:20:26 +00:00
|
|
|
|
|
|
|
WORKDIR /app
|
2021-10-15 13:11:55 +00:00
|
|
|
RUN mvn --batch-mode --define java.net.useSystemProxies=true -Dapache-jsp.scope=compile package
|
2017-10-20 18:20:26 +00:00
|
|
|
|
|
|
|
########################################################################################
|
|
|
|
|
2021-10-15 13:11:55 +00:00
|
|
|
FROM tomcat:10-jdk11-openjdk-slim
|
2017-04-28 08:53:11 +00:00
|
|
|
|
|
|
|
RUN apt-get update && \
|
2021-10-11 15:33:30 +00:00
|
|
|
apt-get install -y --no-install-recommends \
|
|
|
|
fonts-noto-cjk \
|
|
|
|
graphviz \
|
|
|
|
&& \
|
2019-03-18 07:40:25 +00:00
|
|
|
rm -rf /var/lib/apt/lists/*
|
2017-04-28 08:53:11 +00:00
|
|
|
|
2023-01-25 15:35:10 +00:00
|
|
|
COPY docker-entrypoint.tomcat.sh /entrypoint.sh
|
2021-10-11 15:33:30 +00:00
|
|
|
RUN chmod +x /entrypoint.sh
|
2020-11-12 04:34:57 +00:00
|
|
|
|
2023-01-25 15:35:10 +00:00
|
|
|
ENV WEBAPP_PATH=$CATALINA_HOME/webapps
|
2021-10-11 15:33:30 +00:00
|
|
|
RUN rm -rf $WEBAPP_PATH && \
|
|
|
|
mkdir -p $WEBAPP_PATH
|
2023-01-25 15:35:10 +00:00
|
|
|
COPY --from=builder /app/target/plantuml.war /plantuml.war
|
2020-11-12 04:34:57 +00:00
|
|
|
|
2021-10-11 15:33:30 +00:00
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
|
|
CMD ["catalina.sh", "run"]
|
2022-11-07 11:35:38 +00:00
|
|
|
# Openshift https://docs.openshift.com/container-platform/4.9/openshift_images/create-images.html#images-create-guide-openshift_create-images
|
|
|
|
USER root
|
2022-11-07 11:53:31 +00:00
|
|
|
RUN chgrp -R 0 $CATALINA_HOME && chmod -R g=u $CATALINA_HOME
|