This repo demonstrates a lightweight docker able to run the popular Java diagramming tool plantuml.
- Build the image locally or pull it from DockerHub, then run then container
- Copy the input plantuml diagram from the host to the running container, using the command
docker cp
. This should look likedocker cp src/diagram.iuml 3689309baac3:/usr/local
where3689309baac3
is the container ID. - Inside the container, run
plantuml diagram.iuml
to generate the output figurediagram.png
- Copy the output figure from the container to the host, e.g.
docker cp 3689309baac3:/usr/local/diagram.png .
The docker builds on top of a tiny Alpine Linux Image and provides a minimalistic Java Runtime Environment tailored to running the plantuml tool.