OneBite.Dev - Coding blog in a bite size

start docker daemon linux

Simple docker step by step how to start docker daemon linux with explanation

Docker enhances the process of packaging and distributing software, making it an integral part of many DevOps pipelines. This article will guide you in starting the Docker daemon in Linux.

Firstly, it’s necessary to understand what exactly Docker daemon is. The Docker daemon (dockerd) is a persistent process that manages Docker containers. This daemon listens for Docker API requests and manages Docker objects such as images, containers, networks and volumes.

Prerequisites

You need to have Docker installed on your Linux system. If not installed, follow Docker’s official installation guide for Linux.

Step 1: Check Docker status

First, check if Docker is already running in your system. Open a terminal and type:

sudo systemctl status docker

If Docker is running, the output will show ‘Active: active (running)‘.

Step 2: Start Docker

If Docker isn’t running, you can start it with this command:

sudo systemctl start docker

Starting Docker this way initiates the Docker daemon, which manages all Docker services.

Step 3: Enable Docker

In order to have Docker startup at system boot, type the following into the terminal:

sudo systemctl enable docker

Step 4: Verify Docker status

Finally, to verify that Docker has started and is set to run on boot, run the status command again:

sudo systemctl status docker

The output should now report ‘Active: active (running)‘.

Conclusion

Starting the Docker daemon in Linux is a straightforward task, as long as Docker is properly installed on your system. By following these simple steps, you can ensure that Docker is always up and running on your Linux machine, ready for you to start working with Docker containers.

docker