Small docker image to run mkdocs and expose local content on a small HTTP server.
MkDocs is a fast, simple static site generator that's geared towards building project documentation. Documentation source files are written in Markdown, and configured with a single YAML configuration file. Start by reading the introduction below, then check the User Guide for more info.
mkdocs.ymllocalhost:8000$ docker run --rm -it -p 8000:8000 -v ${PWD}:/docs titom73/mkdocs
...
$ docker run --rm -it -v ${PWD}:/docs titom73/mkdocs build
...
Use docker-compose to override ENTRYPOINT and CMD commands:
version: "3"
services:
webdoc:
image: titom73/mkdocs
volumes:
- ${PWD}:/docs
entrypoint: ""
command: ["sh", "-c", "pip install -r my/path/to/requirements.txt\
&& mkdocs serve --dev-addr=0.0.0.0:8000"]
$ docker build --rm --pull -t titom73/mkdocs .
Sending build context to Docker daemon 3.584kB
Step 1/9 : FROM python:3.8-alpine
3.8-alpine: Pulling from library/python
Digest: sha256:c5623df482648cacece4f9652a0ae04b51576c93773ccd43ad459e2a195906dd
$ docker images titom73/mkdocs
REPOSITORY TAG IMAGE ID CREATED SIZE
titom73/mkdocs latest 87f3bedeca0e 2 hours ago 168MB
Content type
Image
Digest
Size
65.2 MB
Last updated
over 5 years ago
docker pull titom73/mkdocs