This image aims to make it as easy as possible to write your awesome documentation.
TL;DR - The ENTRYPOINT
is the mkdocs
command itself, so just use this container as if you had the mkdocs script installed on your path.
- The image relies on you mounting a host directory to /usr/src/docs in the container.
- The entrypoint to the container is the
mkdocs
command. - You can then use this is a Docker image as a commandline utility.
Create a new mkdocs project called mydocs
in the current directory.
docker run -it --rm -v ${PWD}:/usr/src/docs rabbitbird/mkdocs new mydocs
Serving a mkdocs project is the default behaviour.
Presuming you're in your project directory, run:
docker run -it --rm -v ${PWD}:/usr/src/docs -p 8080:8080 rabbitbird/mkdocs
You can then view your docs at .
If port 8080 is clashing with another service you're running locally, use docker run -it --rm -v ${PWD}:/usr/src/docs -P rabbitbird/mkdocs
and then use docker ps
to see which unprivilidged port Docker has mapped to the running image.
We just pass the build --clean
command.
docker run -it --rm -v ${PWD}:/usr/src/docs rabbitbird/mkdocs build --clean