How To: Docker: Install Docker Engine on CentOS
- Chris Speed
- Jul 21, 2023
- 1 min read
Install the required packages to allow yum to use a repository over HTTPS:
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
Add the Docker repository to the system:
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Install Docker:
sudo yum install -y docker-ce docker-ce-cli containerd.io
Start the Docker service:
sudo systemctl start docker
Enable Docker to start on system boot:
sudo systemctl enable docker
Verify that Docker is running:
sudo systemctl status docker
Run Docker commands without using sudo
sudo usermod -aG docker your_username
Verify that the Docker Engine installation is successful by running
docker run hello-world
Restart Docker
sudo systemctl restart docker
Reference:
Install Docker Engine on CentOS. https://docs.docker.com/engine/install/centos/
"I was struggling to install Docker Engine on my CentOS system, and it felt like nothing was working correctly. Thankfully, I came across this amazing Docker installation guide for CentOS. It provided clear and detailed steps, from installing the required packages to verifying the Docker installation with docker run hello-world. The guide also explained how to configure Docker to run without using sudo, which was a game-changer for me. Following this guide made the entire process seamless, and now Docker is up and running perfectly on my system!"