mirror of
https://github.com/octoleo/plantuml-server.git
synced 2024-12-22 08:48:54 +00:00
34 lines
784 B
Docker
34 lines
784 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 package
|
|
|
|
########################################################################################
|
|
|
|
FROM jetty:9.4-jre11-slim
|
|
|
|
USER root
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
fonts-noto-cjk \
|
|
graphviz \
|
|
&& \
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
/generate-jetty-start.sh
|
|
|
|
COPY docker-entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
USER jetty
|
|
|
|
ENV BASE_URL=ROOT \
|
|
WEBAPP_PATH=$JETTY_BASE/webapps
|
|
RUN rm -rf $WEBAPP_PATH && \
|
|
mkdir -p $WEBAPP_PATH
|
|
COPY --from=builder /app/target/plantuml.war $WEBAPP_PATH/ROOT.war
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|