mirror of
https://github.com/octoleo/plantuml-server.git
synced 2024-11-14 00:14:06 +00:00
e5d11fb89a
- PDF dependency was missing in the pom file the JDK8 * We should think about creating a parent pom - in that case all plantuml dependencies could be in the parent pom and we would only the mantain one pom file. (It is also possible to drop the Java 8 support.) * Why do we not have any PDF tests? - add rule to ignore version update hint with `-dev` followed by a dot and date (e.g. `0.37.0-dev.20230308`) - migration from JUnit4 to JUnit5
74 lines
2.3 KiB
Docker
74 lines
2.3 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.15-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 \
|
|
libgd3 \
|
|
&& \
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
/generate-jetty-start.sh
|
|
|
|
# Build Graphviz from source because there are no binary distributions for recent versions
|
|
ARG GRAPHVIZ_VERSION=8.0.2
|
|
ARG GRAPHVIZ_BUILD_DIR=/tmp/graphiz-build
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
curl \
|
|
build-essential \
|
|
libexpat1-dev \
|
|
libgd-dev \
|
|
zlib1g-dev \
|
|
&& \
|
|
mkdir -p $GRAPHVIZ_BUILD_DIR && \
|
|
cd $GRAPHVIZ_BUILD_DIR && \
|
|
curl -o graphviz.tar.gz https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/${GRAPHVIZ_VERSION}/graphviz-${GRAPHVIZ_VERSION}.tar.gz && \
|
|
tar -xzf graphviz.tar.gz && \
|
|
cd graphviz-$GRAPHVIZ_VERSION && \
|
|
./configure && \
|
|
make && \
|
|
make install && \
|
|
apt-get remove -y \
|
|
build-essential \
|
|
libexpat1-dev \
|
|
libgd-dev \
|
|
zlib1g-dev \
|
|
&& \
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
rm -rf $GRAPHVIZ_BUILD_DIR
|
|
|
|
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"]
|