Hands-on task
Site files from the server: -v
A site page lives in /root/site. Start nginx in the background from the nginx:1.27-alpine image, named shop, so that:
- the site opens from the server at
http://127.0.0.1:8081/; - nginx serves the files straight from
/root/site— an edit to a file on the server shows up on the site right away, with no copying into the container.
nginx in the container takes the site files from /usr/share/nginx/html and listens on port 80.
- docker run -v
- bind mount
- volumes