plantuml-server/Dockerfile.jetty

44 lines
1.4 KiB
Docker
Raw Normal View History

2021-10-11 15:33:30 +00:00
FROM maven:3-jdk-11-slim AS builder
COPY pom.xml /app/
2021-10-11 15:33:30 +00:00
COPY src/main /app/src/main/
WORKDIR /app
RUN mvn --batch-mode --define java.net.useSystemProxies=true package
########################################################################################
FROM jetty:11.0.7-jre11-slim
# Proxy and OldProxy need empty path segments support in URIs
# Hence: allow AMBIGUOUS_EMPTY_SEGMENT
# Changes are only active if `/generate-jetty-start.sh` is called!
RUN sed -i 's/# jetty\.httpConfig\.uriCompliance=DEFAULT/jetty.httpConfig.uriCompliance=DEFAULT,AMBIGUOUS_EMPTY_SEGMENT/g' /var/lib/jetty/start.d/server.ini
2017-12-13 09:31:39 +00:00
USER root
RUN apt-get update && \
2021-10-11 15:33:30 +00:00
apt-get install -y --no-install-recommends \
fonts-noto-cjk \
graphviz \
&& \
rm -rf /var/lib/apt/lists/* && \
/generate-jetty-start.sh
2017-12-13 09:31:39 +00:00
2023-01-25 15:35:10 +00:00
COPY docker-entrypoint.jetty.sh /entrypoint.sh
2021-10-11 15:33:30 +00:00
RUN chmod +x /entrypoint.sh
2017-12-13 09:31:39 +00:00
USER jetty
2023-01-25 15:35:10 +00:00
ENV WEBAPP_PATH=$JETTY_BASE/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
COPY ROOT.jetty.xml $WEBAPP_PATH/ROOT.xml
2021-10-11 15:33:30 +00:00
ENTRYPOINT ["/entrypoint.sh"]
2022-11-07 11:33:47 +00:00
# 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 $JETTY_BASE && chmod -R g=u $JETTY_BASE
RUN chgrp -R 0 /tmp && chmod -R g=u /tmp
2022-11-07 11:34:37 +00:00
USER jetty