Time required: 2 Hours
Using many of the Docker commands we have learned, we will backup and restore images and containers.
In this lab, we will put into practice some of the Dockerfile commands that we have learned. Using what we know, we will download an image, back it up, then restore it. We will instantiate a container from this image, we make changes to the contents of the container, then back up the running container again, restore it.
1. Install Docker and configure the service so that it is running.
2. Pull down an image from hub.docker.com
3. Tag the image several times.
4. Save the image to a tar file.
5. Delete the images from Docker.
6. Verify image is deleted.
7. Restore image and tags from tar file.
8. Verify image and tags have been restored.
9. Instantiate a container from an image.
10. Log in to the container.
11. Make changes to the container.
12. Backup the running container.
13. Stop running container.
14. Delete stopped container.
15. Restore container image from the backup.
16. Instantiate the instance.
17. Check changes made are on the running image.
18. Stop running instance.
19. Delete all instances, images, and backups.
20. Verify all instances, images, and backups are deleted.