Step-by-step instructions for installing Docker on CentOS 9.
This comprehensive guide will walk you through installing Docker on CentOS 9. Follow these steps carefully to ensure a successful installation.
First, ensure your system is up to date:
sudo dnf update -y
Install required dependencies:
sudo dnf install -y yum-utils device-mapper-persistent-data lvm2
Now install Docker using the package manager:
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io -y
Start the Docker service and enable it to run on boot:
sudo systemctl start docker
sudo systemctl enable docker
Edit the configuration file located at /etc/docker/daemon.json:
sudo vi /etc/docker/daemon.json
Check that Docker is running correctly:
sudo docker --version
sudo docker run hello-world
Congratulations! You now have Docker running on CentOS 9. For additional configuration options, refer to the official Docker documentation.
Step-by-step installation guides for various software and operating systems
View all articles