mirror of
https://github.com/octoleo/plantuml-server.git
synced 2024-11-14 16:34:08 +00:00
1245b15e01
Set a mount point for read-only root file system configurations. Without the explicit mount point definition in the image, we were facing issues on Amazon ECS, because the directory got mounted with different ownership (root) and mode (0755). For reference please see also: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/bind-mounts.html#bind-mount-considerations
46 lines
1.4 KiB
Docker
46 lines
1.4 KiB
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: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
|
|
|
|
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.jetty.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
USER jetty
|
|
|
|
ENV WEBAPP_PATH=$JETTY_BASE/webapps
|
|
RUN rm -rf $WEBAPP_PATH && \
|
|
mkdir -p $WEBAPP_PATH
|
|
COPY --from=builder /app/target/plantuml.war /plantuml.war
|
|
COPY ROOT.jetty.xml $WEBAPP_PATH/ROOT.xml
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
# 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
|
|
USER jetty
|
|
|
|
VOLUME ["/tmp/jetty"]
|