UPDATE: If you are using RHEL 8.x use these directions instead of the ones below.
You want to install Docker on an AWS instance of RedHat Linux (version 7.x or below). You do not want to use CentOS packages. What do you do?
For RedHat Linux running via AWS, you have to run one command to enable numerous yum repositories. This way yum command can install many packages and dependencies. In this case, you just want to install Docker.
On the RHEL server run these two commands:
sudo yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional sudo yum -y install docker
# If you cannot run yum-config-manager, see these alternative directions.
# To start the Docker service, run this command:
sudo service docker start
# For using kubeadm, you will need to enable the Docker service. This command can help you do that:
sudo systemctl enable docker