forked from plantuml/plantuml-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.jetty
38 lines (28 loc) · 1.09 KB
/
Dockerfile.jetty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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.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"]