Skip to content
Snippets Groups Projects
Commit e0588108 authored by Jan Frenzel's avatar Jan Frenzel
Browse files

Added a VOLUME to the Dockerfile, so that there is the possibility to

use the auto-update functionality of mkdocs; changed the README.md
accordingly.
parent 2f99f072
No related branches found
No related tags found
3 merge requests!322Merge preview into main,!319Merge preview into main,!211Added information about how to use the Dockerfile to serve the documentation.
......@@ -18,4 +18,6 @@ RUN npm install -g markdownlint-cli markdown-link-check
WORKDIR /src/doc.zih.tu-dresden.de
VOLUME ["/docs"]
CMD ["mkdocs", "build", "--verbose"]
......@@ -120,20 +120,17 @@ cd /PATH/TO/hpc-compendium
docker build -t hpc-compendium .
```
**Note:** Whenever you change the documentation, you need to rebuild the container, so that
recent changes are included in the container.
Afterwards, inspect the output. `mkdocs` was automatically invoked to build the documentation,
so it should have given some information if some things were not as expected.
If you want to see how it looks in your browser, you can use shell commands to serve
the documentation (first line) and get the URL for your browser's address bar (second line):
```Bash
docker run -it hpc-compendium mkdocs serve -a 0.0.0.0:8000
docker run -it -w /docs --mount src="$(pwd)"/doc.zih.tu-dresden.de,target=/docs,type=bind hpc-compendium bash -c "mkdocs build --verbose && mkdocs serve -a 0.0.0.0:8000"
docker inspect `docker ps | grep hpc-compendium | cut -d' ' -f1` | sed -n '/\<IPAd/s#^.*"\([0-9.]*\)".*$#http://\1:8000#p' | head -n1
```
If you want to check whether the markdown files are formatted properly, use the following command:
The first line (with the mount option) automatically takes care of the file changes and rebuilds
the documentation. If you want to check whether the markdown files are formatted properly, use the
following command:
```Bash
docker run -it hpc-compendium markdownlint docs
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment