| |
@@ -5,7 +5,7 @@
|
| |
# Let's assume that the user has the Docker CE installed
|
| |
# which doesn't require a root password.
|
| |
echo "The preview will be available at http://localhost:8080/"
|
| |
- docker run --rm -v $(pwd)/public:/usr/share/nginx/html:ro -p 8080:80 nginx
|
| |
+ docker run --rm -v $(pwd):/antora:ro -p 8080:80 nginx
|
| |
|
| |
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
|
| |
# Running on Linux.
|
| |
@@ -14,5 +14,5 @@
|
| |
echo ""
|
| |
echo "This build script is using Docker to run the build in an isolated environment. You might be asked for a root password in order to start it."
|
| |
echo "The preview will be available at http://localhost:8080/"
|
| |
- sudo docker run --rm -v $(pwd)/public:/usr/share/nginx/html:ro -p 8080:80 nginx
|
| |
+ sudo docker run --rm -v $(pwd):/antora:ro,z -v $(pwd)/nginx.conf:/etc/nginx/conf.d/default.conf:ro,z -p 8080:80 nginx
|
| |
fi
|
| |
antora deletes and recreates public/ every time the docs are rebuilt;
mounting public/ directly meant that when build.sh, the existing nginx
container didn't see the new docs. Instead of mounting public/ directly
into the nginx default webroot, mount the parent directory at /antora,
and install a tiny nginx configuration file to point the webroot at the
right place.