Introduces a development container using an Ubuntu-based image. Installs Java, Graphviz, and PlantUML for local diagram rendering. Sets up a script to start the PlantUML server automatically in interactive sessions.
17 lines
756 B
Docker
17 lines
756 B
Docker
FROM mcr.microsoft.com/devcontainers/base:ubuntu
|
|
|
|
# Install Java and graphviz (for local rendering)
|
|
RUN apt-get update && \
|
|
apt-get install -y openjdk-17-jre graphviz wget && \
|
|
wget https://downloads.sourceforge.net/project/plantuml/plantuml.jar -O /usr/local/bin/plantuml.jar
|
|
|
|
# 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
|