Merge pull request #1391 from MattKobayashi/readme_improve-docker-instructions

readme: Improve Docker instructions
This commit is contained in:
Christian Breunig 2024-05-09 17:27:38 +02:00 committed by GitHub
commit 63b9255ba6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -90,12 +90,14 @@ If the `vyos/vyos-documentation` container could not be found locally it will be
automatically fetched from Dockerhub. automatically fetched from Dockerhub.
```bash ```bash
$ docker run --rm -it -v "$(pwd)":/vyos -w /vyos/docs \ $ git clone https://github.com/vyos/vyos-documentation.git
-e GOSU_UID=$(id -u) -e GOSU_GID=$(id -g) vyos/vyos-documentation make html
# sphinx autobuild $ cd vyos-documentation
$ docker run --rm -it -p 8000:8000 -v "$(pwd)":/vyos -w /vyos/docs -e \
GOSU_UID=$(id -u) -e GOSU_GID=$(id -g) vyos/vyos-documentation make livehtml $ docker run --rm -it -v "$(pwd)":/vyos -w /vyos/docs -e GOSU_UID=$(id -u) -e GOSU_GID=$(id -g) vyos/vyos-documentation make html
# For sphinx autobuild
$ docker run --rm -it -p 8000:8000 -v "$(pwd)":/vyos -w /vyos/docs -e GOSU_UID=$(id -u) -e GOSU_GID=$(id -g) vyos/vyos-documentation make livehtml
``` ```
### Test the docs ### Test the docs
@ -103,13 +105,11 @@ $ docker run --rm -it -p 8000:8000 -v "$(pwd)":/vyos -w /vyos/docs -e \
To test all files, run: To test all files, run:
```bash ```bash
$ docker run --rm -it -v "$(pwd)":/vyos -w /vyos/docs \ $ docker run --rm -it -v "$(pwd)":/vyos -w /vyos/docs -e GOSU_UID=$(id -u) -e GOSU_GID=$(id -g) vyos/vyos-documentation vale .
-e GOSU_UID=$(id -u) -e GOSU_GID=$(id -g) vyos/vyos-documentation vale .
``` ```
to test a specific file (e.g. `quick-start.rst`) to test a specific file (e.g. `quick-start.rst`)
```bash ```bash
$ docker run --rm -it -v "$(pwd)":/vyos -w /vyos/docs -e GOSU_UID=$(id -u) \ $ docker run --rm -it -v "$(pwd)":/vyos -w /vyos/docs -e GOSU_UID=$(id -u) -e GOSU_GID=$(id -g) vyos/vyos-documentation vale quick-start.rst
-e GOSU_GID=$(id -g) vyos/vyos-documentation vale quick-start.rst
``` ```