From 47ef5575a7b9c491b76bc743300d286dec8fd8d1 Mon Sep 17 00:00:00 2001 From: Hans-Nikolai Viessmann Date: Thu, 9 Jul 2026 14:55:40 +0200 Subject: [PATCH] add dockerfile and update readme --- Dockerfile | 5 +++++ README.md | 20 +++++++++++++++++++- compose.yml | 14 ++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 Dockerfile create mode 100644 compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..646c7ce6c6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM docker.io/squidfunk/mkdocs-material:9.7 + +# add some plugins +ADD requirements.txt /requirements.txt +RUN pip install -r /requirements.txt diff --git a/README.md b/README.md index 17f2d7f9fc..10baf933da 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,30 @@ ## Build Instructions +## Using Docker compose + +1. Ensure you have Docker or Podman installed with the correct `compose` command setup +2. Run compose to build and serve the site: + + ```bash + docker|podman compose up + ``` + + > [!TIP] + > You might have to use `--force-recreate` to ensure that changes in the Dockerfile + > are applied to a new container. Compose will normal use the last running container. + +### Using pip (or virtual envs) + 1. Install the required dependencies: + ```bash pip install -r requirements.txt ``` 2. [Build the website](https://www.mkdocs.org/getting-started/): + ```bash mkdocs serve - ``` \ No newline at end of file + ``` + diff --git a/compose.yml b/compose.yml new file mode 100644 index 0000000000..b672f06d36 --- /dev/null +++ b/compose.yml @@ -0,0 +1,14 @@ +--- +services: + mkdocs: + build: . + # explicitly force live-reloading per https://github.com/squidfunk/mkdocs-material/issues/8478 + command: serve --dev-addr=0.0.0.0:8000 --livereload + security_opt: + - no-new-privileges:true + volumes: + - ./:/docs + ports: + - 8000:8000 + healthcheck: + test: wget --spider --quiet http://127.0.0.1:8000