Docker is a popular tool in DevOps. What is its main purpose?
Think about how Docker helps developers run apps the same way everywhere.
Docker creates containers that package an application and its dependencies, ensuring it runs the same on any system.
After running docker ps on a system with two running containers, what will you see?
docker ps
Remember, docker ps shows running containers, not images or stopped containers.
The docker ps command lists all currently running containers with their details.
In a Dockerfile, which instruction is used to specify the base image for your container?
Dockerfile snippet
The base image is the starting point for your container's environment.
The FROM instruction sets the base image in a Dockerfile, defining the starting environment.
Arrange these steps in the correct order to build and run a Docker container from a Dockerfile.
First create the Dockerfile, then build the image, run the container, and finally check it.
You must write the Dockerfile first, then build the image, run the container, and check its status.
You run docker ps but get an error. What is the most likely error message if the Docker daemon is not running?
Think about what happens if the Docker service is stopped but you try to use Docker commands.
If the Docker daemon is not running, commands like docker ps cannot connect and show this error.