check if docker daemon is running
Simple docker step by step how to check if docker daemon is running with explanation
Docker has definitely changed the world by making it possible for developers to package applications into containers. However, before you begin working with these containers, it’s important to ensure that the Docker daemon is up and running on your system. This short tutorial will guide you easily how to check if the Docker daemon is running.
Step 1: Open the Terminal or Console
Start by opening the terminal or console on your machine. On a Windows device, you can click on the “Start” button and type “cmd” to open the command prompt. On a Mac, access the terminal via Applications -> Utilities -> Terminal. On Linux, you just hit Ctrl + Alt + T.
Step 2: Enter Docker Command
Next, input the command docker version
into the terminal or console. Then, hit “Enter” to execute it. This command will provide you with information about the version of Docker running on your machine.
Step 3: Check Docker Version Output
Look at the output given by the terminal or console. If Docker daemon service is running, the command will give specific outputs including the Docker version, API version, Go version, Git commit, Built, OS/Arch, and others.
In case there’s an error like Cannot connect to the Docker daemon. Is the docker daemon running on this host?
, then it signifies the Docker daemon isn’t running.
Step 4: Checking Docker Daemon Status
There is another way to directly check the status of your Docker daemon, by typing systemctl status docker
or service docker status
depending on your Linux distribution. You’ll see the status as active or inactive.
Remember to use sudo
before these commands if you’re not logged in as a root user.
Step 5: Start Docker Daemon
If your Docker daemon isn’t running, use the command systemctl start docker
or service docker start
to boot it up, again depending on your Linux distribution.
Now you know how to check if the Docker daemon is up and running. Keep these steps in mind the next time you start working with Docker containers. Happy Dockering!