DEV Community

Wycliffe A. Onyango
Wycliffe A. Onyango

Posted on

100 Days of DevOps: Day 35

Installing Docker Packages and Starting Docker Service

Step 1: Add the Docker Repository

Run the following command to add the repository. This will enable dnf to find the Docker packages.

sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Enter fullscreen mode Exit fullscreen mode

Step 2: Install Docker Packages

After adding the repository, run the dnf install command. dnf will be able to locate and install the Docker packages.

sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Enter fullscreen mode Exit fullscreen mode

Step 3: Start the Docker Service

Once the installation is complete, you'll need to start and enable the Docker service to ensure it runs automatically on startup.

sudo systemctl start docker
sudo systemctl enable docker
Enter fullscreen mode Exit fullscreen mode

By following these steps, you'll successfully install and set up Docker.

Top comments (0)