Skip to main content
Learn how to quickly install and configure Docker Engine (Community Edition) on a CentOS 7 server. This guide covers uninstalling old packages, setting up the official Docker repository, installing Docker CE, and verifying your installation.
Always refer to the official Docker documentation for the most up-to-date installation instructions.

Prerequisites

Log in to your server:

1. Remove Older Docker Versions

Before installing Docker CE, remove any legacy packages to prevent conflicts:
Verify your enabled repos:
You should see base, extras, and updates in the list.
Removing old Docker packages will not delete your images or containers stored under /var/lib/docker, but it’s a good idea to back up any critical data before proceeding.

2. Install Dependencies & Configure the Docker Repository

  1. Install yum-utils, which provides the yum-config-manager utility:
  2. Add the official Docker CE repository:
  3. Confirm the new repo is enabled:
You should see an entry similar to docker-ce-stable/x86_64.

3. Install Docker Engine (Docker CE)

Install Docker Engine and its core components:
Verify that the Docker packages are installed:
Expected packages in the output:
  • docker-ce
  • docker-ce-cli
  • containerd.io

4. Start and Enable the Docker Service

  1. Check the Docker service status:
  2. If it’s not running, start and enable it to launch on boot:
  3. Re-check to ensure Docker is active:

5. Verify Your Docker Installation

  • Check Docker version:
    Sample output:
  • View detailed client/server info:
  • Display full system information:
When you see information about the Engine, containerd, runc, and your host environment, Docker is installed and running correctly. Congratulations! You have successfully installed and configured Docker Engine on CentOS 7.

Watch Video