The first step is to Set up the Docker CE repository on RHEL:
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum makecache fast
Install the latest version of Docker CE on RHEL:
sudo yum -y install docker-ce
Alternatively, you can specify a specific version of Docker CE:
sudo yum -y install docker-ce-<version>-<release>
Start Docker:
sudo systemctl start docker
Test your Docker CE installation:
use mock to build the package from the sources on git.centos.org
sudo docker run hello-world
But there is a need to check for the dependencies for that please refer my answer on https://intellipaat.com/community/8722/docker-ce-on-rhel-requires-container-selinux-2-9 that will help you if you got any package error.