0

Install Docker in Red Hat Enterprise Linux and AWS EC2

This post demonstrates how to install Docker in Red Hat Enterprise Linux in AWS EC2.

Requirements

  • AWS Account
  • Email address
  • Provisioned EC2 instance with Red Hat Enterprise Linux AMI
  • Putty

Provision an EC2 Instance

We require a EC2 already provisioned. Please revisit the following blog post.

Provision a Server (EC2) on AWS

Convert .pem files to.pkk for putty

We may reuse existing key pair generated from previously provisioned EC2 instances to avoid converting .pem to .pkk files over and over. In case there is a circumstance that requires new key pair to be generated, please revisit the following blog post.

Convert the PEM files to a PPK files using PuttyGen

Install Docker

1. Check Linux version

There is a minimum kernel requirements for Docker. It must be at least version 3.10. To find out the kernel version, use:

or

2. Update yum

It is recommended to update our system. Use:

When YUM asks us for some confirmation about the total size of binaries to be downloaded, type y and press Enter to proceed.

Installation completes!

3. Add Docker repository

Use the following command:

Notice the baseurl points to https://yum.dockerproject.org/repo/main/centos/7/

If we access the https://yum.dockerproject.org/repo/main/centos/, we get this page. Depending on our requirement, we have need to choose Docker binaries between two versions CentOS. For this post, we use version 7.

4. Install Docker Engine

Then we install docker-engine.

Type y and press Enter to proceed.

Type y and press Enter to proceed, again.

docker-engine installation completes.

5. Enable Docker Service

Use the following command:

6. Start Docker

Use the following command:

7. Verify Docker is Running

Use the following command: