From 3c681559ae0cb2660fb60c2173cf00516ad4f5a7 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 9 Nov 2019 10:58:50 +0100 Subject: README: reword instructions to match Dockerhub --- README.md | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index cbd37b63..8b8f5931 100644 --- a/README.md +++ b/README.md @@ -36,39 +36,41 @@ that is used to build a VyOS documentation. ## Setup +You can either build the container on your own or directly fetch it prebuild +from Dockerhub. If you want to build it for yourself, use the following command. + ```bash $ docker build -t vyos-docu docker ``` -### Build +### Build documentation -Linux -```bash -$ docker run --rm -it -v "$(pwd)":/vyos -w /vyos/docs -e GOSU_UID=$(id -u) -e GOSU_GID=$(id -g) vyos-docu make html +If the `vyos/vyos-documentation` container could not be found locally it will be +automatically fetched from Dockerhub. -# 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-docu make livehtml -``` - -Windows -```powershell -docker run --rm -it -v "$(pwd):/vyos" -w /vyos/docs vyos-docu make html +```bash +$ 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 # sphinx autobuild -docker run --rm -it -p 8000:8000 -v "$(pwd):/vyos" -w /vyos/docs vyos-docu make livehtml +$ 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 -discuss in this Task: [T1731](https://phabricator.vyos.net/T1731) +Discuss in this Phabricator task: [T1731](https://phabricator.vyos.net/T1731) -to test all files: +To test all files run: ```bash -$ docker run --rm -it -v "$(pwd)":/vyos -w /vyos/docs -e GOSU_UID=$(id -u) -e GOSU_GID=$(id -g) vyos-docu vale . +$ docker run --rm -it -v "$(pwd)":/vyos -w /vyos/docs \ + -e GOSU_UID=$(id -u) -e GOSU_GID=$(id -g) vyos/vyos-documentation vale . ``` -to test a specific file e.g. clustering.rst +to test a specific file e.g. `clustering.rst` + ```bash -$ docker run --rm -it -v "$(pwd)":/vyos -w /vyos/docs -e GOSU_UID=$(id -u) -e GOSU_GID=$(id -g) vyos-docu vale clustering.rst +$ docker run --rm -it -v "$(pwd)":/vyos -w /vyos/docs -e GOSU_UID=$(id -u) \ + -e GOSU_GID=$(id -g) vyos/vyos-documentation vale clustering.rst ``` -- cgit v1.2.3