Docker Guide

Docker Commands

To check if a Docker container is running,

Open Git Bash and run the following command to see all currently running containers:

docker ps

If you want to see all containers (including those that have stopped or exited), add the -a flag:

docker ps -a

How to verify

Common errors:

failed to connect to the docker API at npipe:////./pipe/dockerDesktopLinuxEngine; check if the path is correct and if the daemon is running: open //./pipe/dockerDesktopLinuxEngine: The system cannot find the file specified.

If the docker desktop is not running on windows, you will face the above error running docker ps command.

docker exec -it container_name bash

Use this command to open an interactive command-line session inside a running Docker container.