🍀 Challenge

Let's put to test what we have learned so far!

We'll cover the following

Challenge

Test your mastery of Docker’s commands in this challenge.

Click the Run button, you will be able to view a terminal, then do the following:

  1. Build the image and up the container in a detached mode.
  2. Stop the web service only.
  3. Restart the web service only.
  4. View all the images created.
  5. View all the containers or services created.
  6. Stop all the containers or services except for the educative one. You can list the containers except for the educative one using the following command:
docker ps --format '{{.Names}}' | grep -v "educative" | awk '{print $1}'
  1. View all the stopped containers or services.
  2. Delete all the containers except for the educative one.

Remember the stopped containers are in the exited state.

  1. Delete all the networks.
  2. Delete all the images.

Get hands-on with 1200+ tech skills courses.