Skip to content

Instantly share code, notes, and snippets.

@saidsef
Last active August 25, 2020 22:24
Show Gist options
  • Select an option

  • Save saidsef/d9eb94aaaed9cb676cadb5af2f7d59c0 to your computer and use it in GitHub Desktop.

Select an option

Save saidsef/d9eb94aaaed9cb676cadb5af2f7d59c0 to your computer and use it in GitHub Desktop.
## replace Dockerfile.jetty in https://github.com/plantuml/plantuml-server
## this will produce smaller image ~ 150MB
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
########################################################################################
FROM jetty:9-alpine
LABEL maintainer="Said Sef <saidsef@gmail.com> (saidsef.co.uk/)"
USER root
RUN apk add --update graphviz font-noto-extra wqy-zenhei --repository http://nl.alpinelinux.org/alpine/edge/testing --allow-untrusted && \
fc-cache -f && \
rm -rfv /var/cache/apk/*
USER jetty
ENV GRAPHVIZ_DOT=/usr/bin/dot
ARG BASE_URL=ROOT
COPY --from=builder /app/target/plantuml.war /var/lib/jetty/webapps/$BASE_URL.war
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment