How Do You Install Docker on an AWS Instance of RHEL?

UPDATE: If you are using RHEL 8.x use these directions instead of the ones below.

Problem scenario
You want to install Docker on an AWS instance of RedHat Linux.  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
(If you want to install Docker on a RHEL server in GCP, see this posting.  For CentOS in GCP you simply need to run sudo yum -y install docker. For a variety of different Docker installation directions, see this posting.)

Leave a comment

Your email address will not be published. Required fields are marked *