Docker IntroductionIn 2013 the Docker environment was introduced as a platform service product that use OS-level virtualization to deliver software in packages called containers. The service has both free and premium tiers. The software that hosts the containers is called Docker Engine.
sudo dnf update -y
sudo dnf install -y dnf-plugins-core
To install Docker Engine on Red Hat Enterprise Linux (RHEL) and start the service, follow these steps:
sudo dnf remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine
sudo dnf -y install dnf-utils
sudo dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
sudo systemctl start docker
sudo systemctl enable docker
sudo usermod -aG docker $USER
newgrp docker
After this step, you will need to log out and log back in for the changes to take effect.
8. Verify the installation: Run a test container to confirm Docker is working correctly.
docker run hello-world
To install Docker Engine on Rocky Linux and start the service, follow these steps:
sudo dnf remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine
sudo dnf -y install dnf-utils
sudo dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
sudo systemctl start docker
sudo systemctl enable docker
sudo usermod -aG docker $USER
newgrp docker
After this step, you will need to log out and log back in for the changes to take effect.
8. Verify the installation: Run a test container to confirm Docker is working correctly.
docker run hello-world