0% found this document useful (0 votes)
34 views9 pages

Lab3 Docker

This document provides instructions for using Docker to manage containers, images, and volumes. It includes steps to verify Docker is installed, display version information, list and start containers, manage images by saving, loading, and removing them, and manage volumes by creating, attaching to containers, and removing them.

Uploaded by

Aymen CHABBOUH
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views9 pages

Lab3 Docker

This document provides instructions for using Docker to manage containers, images, and volumes. It includes steps to verify Docker is installed, display version information, list and start containers, manage images by saving, loading, and removing them, and manage volumes by creating, attaching to containers, and removing them.

Uploaded by

Aymen CHABBOUH
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

LPI DevOps Tools Engineer Labs

Lab 3 – Docker Engine


Manage containers, images and
volumes
Docker status informations
1. Verify docker is installed and works.

2. Display information about the docker version:


◦ What is the docker client version ?
◦ What is the docker server version ?

1 Brahim HAMDI
LPI DevOps Tools Engineer Labs

Manage containers
3. List all docker containers

4. Find existing nginx images at the registry hub.docker.com/ .

5. Start a container based on the latest nginx Docker Image

2 Brahim HAMDI
LPI DevOps Tools Engineer Labs

◦ What is the id, name and status of the created container ?

◦ Remove the container

6. Start a container based on the latest nginx Docker Image in the background, with nginx1
name. What is the id, name and status of the created container ?

7. Display more informations about nginx1 container.

◦ What is the ip address, netmask, gateway, MAC address and open TCP/ports of nginx1
container ?

3 Brahim HAMDI
LPI DevOps Tools Engineer Labs

8. Test the nginx web page on the browser.

9. Stop nginx1 container and then start it.

10. Remove nginx1 container.

◦ Is nginx image removed too ?

4 Brahim HAMDI
LPI DevOps Tools Engineer Labs

Manage images
11. List all local docker images

12. Display
detailed

informations about the nginx image. What is the hash, version and creation date of the nginx
image ?

13. Save nginx image to nginx.tar file

14. Run a web container with nginx image

5 Brahim HAMDI
LPI DevOps Tools Engineer Labs

15. Remove the nginx image. Is the nginx image removed ? Why ?

16. Stop the container, then remove the image.

◦ Is the nginx image removed ? How to remove the image ?

17. Load nginx image from nginx.tar archive

Manage volumes
18. Create volume vol1.

What is the path of vol1 mount point ? Is it empty ?

6 Brahim HAMDI
LPI DevOps Tools Engineer Labs

19. Run a container with nginx image, that attach volume vol1 to /usr/share/nginx/html folder.

20. Using vol1, modify « index.html » file to display this :


Formation DevOps Tools Engineer
[Your Name]

21. Run another container with nginx image, that attach vol1.

What it display on the web page ?

7 Brahim HAMDI
LPI DevOps Tools Engineer Labs

22. Run a container with mariadb image.

Test sql connexion to the container.

23. Is there any attached volume to the DB container ? If yes, where does it come from ?

8 Brahim HAMDI
LPI DevOps Tools Engineer Labs

24. Remove all volumes. Is there any problem ? Why ?


Stop all containers and then remove all volumes. Is there any problem ? Why ?
Remove all volumes

9 Brahim HAMDI

You might also like