Docker image to produce and serve mkdocs projects
$ docker build -t mkdocs .
Use the path to an existing mkdocs project (NB: do not change '/mkdocs/project') and redirect it to a tar.gz file. Example:
$ docker run -v "/path/to/your/mkdocs/project:/mkdocs/project" mkdocs produce > my_project.tar.gz
Pipe the tar.gz file to the serve command. Example:
$ cat my_project.tar.gz | docker run --rm -p 8000:8000 -i mkdocs serve
For easy usage you can use the mkdockerize wrapper script that calls produce and serve given a mkdocs project Example:
$ ./mkdockerize.sh /path/to/your/mkdocs/project