Docker image containing the PlantUML CLI and Python + Poetry. This is an ideal base image for building MkDocs with the PlantUML plugin!
Simply create a Dockerfile
in your project root to build and run your project.
For example, if you're using MkDocs, the
Dockerfile
would look something like this:
FROM dstockhammer/plantuml-poetry
WORKDIR /app
COPY pyproject.toml .
COPY poetry.lock .
RUN poetry install
EXPOSE 8000
ENTRYPOINT [ "poetry", "run", "mkdocs" ]
Then build your image:
docker build -t my-docs .
To build the site to ./site
mount the project dir to /app
and run build
:
docker run --rm -v $(pwd):/app my-docs build
You can also launch the dev server to get auto reload and everything you would expect as if the tools were installed locally:
docker run -p 8000:8000 -v $(pwd):/app -it my-docs serve --dev-addr 0.0.0.0:8000