Hands-on task
This task is step 6 of the course “Docker: everyday work”
Files in and out: docker cp
nginx runs in the web container, and the site opens from the server at http://127.0.0.1:8082/. Without recreating the container:
- Save a copy of the nginx config from the container — the
/etc/nginx/conf.d/default.conffile — to/root/backup/default.confon the server. - Put the
/root/promo/promo.htmlpage from the server into the container's site directory/usr/share/nginx/html/, so that it opens athttp://127.0.0.1:8082/promo.html.
What you'll practise:
- docker cp