Hands-on task
This task is step 4 of the course “Docker: everyday work”
Inside a container: docker exec
nginx runs in the web container. Without recreating the container:
- Find out the Alpine Linux version inside
web(it's in the container's/etc/alpine-releasefile) and write it to/root/os.txton the server. - Replace the site's main page — the
/usr/share/nginx/html/index.htmlfile in the container — with a single lineHello from inside.
What you'll practise:
- docker exec
- docker exec -it