Quiz 3: Part 2
Objective
Use what you’ve learned so far in this module and apply some of the basic docker commands based on each task.
Prerequisites
- Access to Linux-based machine. Follow the steps in Lab Environment
- Basic knowledge of Linux command line.
- Sudo access
Duration: 60 minutes
Tasks
Task 1: Start docker daemon service
- Docker service is currently stopped in your machines. Start docker service so we can proceed to other tasks.
Task 2: Check and run the available docker images
- Using the docker image with the name
nginx:latest
run the container exposing port 8080 on the host to port 80 in the container. Name the containerquiz-3-part2
. - You can verify if you did this correctly by accessing it in your browser using your
hostname:8080
- This should show the default
Welcome to nginx!
page
Task 3: Start docker container
- There is a container that is currently stopped. Run the container.
Hint: To verify if the container is running correctly, use docker ps
command
Task 4. Stop and delete the running container with the name mysql-acads
- There is a container name
mysql-acads
that is currently running when you started docker service. Stop the container and delete it.
Task 5: Pull and run images from a public registry
- Using this public registry
jgermino/academy-lab-cnm1
pull image with namenginx-lab1
and run it using port 80. Uselab-exercise-1
as the container name.
Note: Make sure that it is detached when you run the container.