1
0
mirror of https://github.com/octoleo/plantuml-server.git synced 2025-01-03 05:00:14 +00:00

Merge pull request #81 from paddy-hack/jetty-tomcat-dockerfile-improvements

Dockerfile improvements for Jetty and Tomcat images.
This commit is contained in:
arnaudroques 2018-11-17 10:36:15 +01:00 committed by GitHub
commit 59f37e996d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 16 deletions

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
# .dockerignore -- stuff we don't need during image builds
/.git/

View File

@ -1,15 +1,10 @@
FROM maven:3-jdk-8 AS builder
RUN apt-get update && \
apt-get install -y --no-install-recommends graphviz fonts-wqy-zenhei && \
apt-get clean
COPY pom.xml /app/
COPY src /app/src/
ENV MAVEN_CONFIG=/app/.m2
WORKDIR /app
RUN mvn package
RUN mvn --batch-mode --define java.net.useSystemProxies=true package
########################################################################################
@ -24,6 +19,7 @@ RUN apt-get update && \
USER jetty
COPY --from=builder /app/target/plantuml.war /var/lib/jetty/webapps/ROOT.war
ENV GRAPHVIZ_DOT=/usr/bin/dot
ARG BASE_URL=plantuml
COPY --from=builder /app/target/plantuml.war /var/lib/jetty/webapps/$BASE_URL.war

View File

@ -1,15 +1,10 @@
FROM maven:3-jdk-8 AS builder
RUN apt-get update && \
apt-get install -y --no-install-recommends graphviz fonts-wqy-zenhei && \
apt-get clean
COPY pom.xml /app/
COPY src /app/src/
ENV MAVEN_CONFIG=/app/.m2
WORKDIR /app
RUN mvn package
RUN mvn --batch-mode --define java.net.useSystemProxies=true package
########################################################################################
@ -20,5 +15,8 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends graphviz fonts-wqy-zenhei && \
apt-get clean
RUN rm -rf /usr/local/tomcat/webapps/ROOT
COPY --from=builder /app/target/plantuml.war /usr/local/tomcat/webapps/ROOT.war
ENV GRAPHVIZ_DOT=/usr/bin/dot
ARG BASE_URL=plantuml
RUN rm -rf /usr/local/tomcat/webapps/$BASE_URL
COPY --from=builder /app/target/plantuml.war /usr/local/tomcat/webapps/$BASE_URL.war