Heavily inspired by the original Docker image, this Docker image will run a plantUML server for you.
docker build --tag plantuml-server .
docker run -d -p 8080:8080 plantuml-server
The plantuml-server is now listening on port 8080 and available using the following URL:
http://localhost:8080/
Setting the environment variable JETTY_CONTEXTPATH
allows you to add a prefix to the URL.
docker run -d -p 8080:8080 -e JETTY_CONTEXTPATH=/plantuml plantuml-server
The plantuml-server is now listening on port 8080 and available using the following URL:
http://localhost:8080/plantuml
The plantuml-server description provides a detailled explanation how to use the plantuml-server.
The examples folder contains an example showing you how to use the plantUML-server to provide images for your GitHub Markdown files.
First get the raw URL of your plantUML file (1):
Go to your plantUML server, modify the below shown plantUML diagram with the raw URL of your plantUML file on GitHub (1):
Press the 'Submit query' button below the input field (2) and finally copy the generated plantUML server URL (3). This URL just points the plantURL server back to your plantUML file on GitHub and doesn't change as long as you don't change the name or location of the file.
Insert this plantUML server URL into your Markdown file (1):
Replacing the png
part (1) in your plantUML server URL with svg
(2) renders your graph as SVG, but to get this also working on GitHub you have to sanitize the SVG first using the GitHub sanitizer by adding &sanitize=1
(3) do your SVG URL.