first see to any previous installation happened with docker or uninstall any older version.
Older versions of Docker went by docker
or docker-engine
. Uninstall any such older versions before attempting to install a new version, along with associated dependencies.
content_copy
$ sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
Certainly! Here are the precise instructions for installing Docker Engine on a CentOS machine using the RPM repository:
Install
yum-utils
:sudo yum install -y yum-utils
Set up the Docker repository:
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Install Docker Engine, containerd, and Docker Compose (Latest Version):
sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
If prompted to accept the GPG key, verify the fingerprint
060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35
and accept it.Start Docker:
sudo systemctl start docker
These commands will set up the Docker repository, install the necessary packages, and start the Docker service on your CentOS machine. Ensure that you have the required permissions to run these commands, and if necessary, add your user to the docker
group to execute Docker commands without using sudo
.
THANKS!