24 lines
884 B
Docker
24 lines
884 B
Docker
FROM mcr.microsoft.com/devcontainers/base:ubuntu
|
|
|
|
# Install Java and graphviz (for local rendering)
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
openjdk-17-jre \
|
|
graphviz \
|
|
curl \
|
|
&& curl -L \
|
|
https://github.com/plantuml/plantuml/releases/latest/download/plantuml.jar \
|
|
-o /usr/local/bin/plantuml.jar \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# PlantUML-Startskript in den Home-Ordner legen
|
|
RUN echo '#!/bin/bash\n' \
|
|
'if ! pgrep -f "plantuml.jar -picoweb" > /dev/null; then\n' \
|
|
' nohup java -Djava.awt.headless=true -jar /usr/local/bin/plantuml.jar -picoweb -port 8080 > ~/.plantuml.log 2>&1 &\n' \
|
|
'fi\n' \
|
|
> /home/vscode/.start-plantuml.sh && \
|
|
chmod +x /home/vscode/.start-plantuml.sh
|
|
|
|
RUN echo '[[ $- == *i* ]] && /home/vscode/.start-plantuml.sh' >> /home/vscode/.bashrc
|