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:
commit
59f37e996d
3
.dockerignore
Normal file
3
.dockerignore
Normal file
@ -0,0 +1,3 @@
|
||||
# .dockerignore -- stuff we don't need during image builds
|
||||
|
||||
/.git/
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user