Skip to content

dstockhammer/docker-plantuml

Repository files navigation

docker-plantuml

Docker image containing the PlantUML CLI. Looking for a base image with bundled Python and Poetry? Check out dstockhammer/docker-plantuml-poetry!

Docker Image Version (latest semver) GitHub last commit

Usage

You can either mount the diagrams as volume:

docker run --rm -v $(pwd):/data dstockhammer/plantuml my-diagram.puml

Or pass a single puml file using stdin:

cat my-diagram.puml | docker run --rm -i dstockhammer/plantuml -pipe > my-diagram.png

Alternatively, you can copy the plantuml.sh script to a location on your system and execute that. For convenience, here's a script that downloads the script and puts it into /usr/local/bin so that you can simply execute plantuml as if it was installed natively:

curl -sL https://raw.githubusercontent.com/dstockhammer/docker-plantuml/master/plantuml.sh > plantuml.sh
sudo mv plantuml.sh /usr/local/bin/plantuml
sudo chmod +x /usr/local/bin/plantuml
plantuml

Note: PlantUML has a history of frequent backward-incompatible changes, so to be safe make sure to replace latest in the script above with a version of choice.