Dragonias Docker Container Quest

DockerDockerBeginner
Practice Now

Introduction

In this lab, we will explore the scenario of the mythical land of Dragonia and follow the path of a skilled dragon warrior who seeks to harness the power of Docker technology for the betterment of their kingdom. With the power of Docker skills, the dragon warrior aims to manage and list containers efficiently, ensuring the security and stability of Dragonia's infrastructure.


Skills Graph

%%%%{init: {'theme':'neutral'}}%%%% flowchart RL docker(("`Docker`")) -.-> docker/ContainerOperationsGroup(["`Container Operations`"]) docker/ContainerOperationsGroup -.-> docker/ls("`List Containers`") subgraph Lab Skills docker/ls -.-> lab-268702{{"`Dragonias Docker Container Quest`"}} end

Listing Containers

In this step, we will learn how to execute the docker ps command to list all the running containers on the Docker daemon. The command docker ps is used to list the containers that are currently running on the system.

First, let's execute the following command in the terminal:

docker ps

This command should display a list of running containers.

Listing All Containers

In this step, we will extend our knowledge by using the docker ps -a command to list all containers - running and stopped. The docker ps -a command provides a complete view of all containers on the Docker daemon.

Let's execute the following command in the terminal:

docker ps -a

This command should display a list of all containers, both running and stopped.

Summary

In this lab, we have delved into the fundamental Docker skill of listing containers using the docker ps and docker ps -a commands. By mastering these skills, the dragon warrior is now equipped to efficiently manage and monitor the containers within the kingdom's infrastructure. This foundational knowledge will pave the way for further exploration into the realm of Docker container management.

Other Docker Tutorials you may like