Docker CE Installation on Red Hat 7

Docker CE is not officially supported on RHEL but you can get the latest Docker CE installed on it.

Here are the steps.

Step 1 : Install yum-utils and epel-release.


# yum install -y yum-utils


# wget
--2018-03-24 10:28:49--
Resolving (,,
Connecting to (||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15080 (15K) [application/x-rpm]
Saving to: ‘epel-release-latest-7.noarch.rpm’

100%[==========================================================================================================================>] 15,080 57.0KB/s in 0.3s

2018-03-24 10:28:50 (57.0 KB/s) - ‘epel-release-latest-7.noarch.rpm’ saved [15080/15080]

# rpm -ivh epel-release-latest-7.noarch.rpm

Step 2 : Add Docker CE to yum repos.

# yum-config-manager --add-repo

Before docker-ce installation, we should install container-selinux. If not docker-ce will fail due to container-selinux dependencies. 

Also, if epel-release package not installed, then also docker-ce will fail with below error.

Error: Package: docker-ce-18.03.0.ce-1.el7.centos.x86_64 (docker-ce-stable) Requires: pigz

Step 3: Install container-selinux package.

# yum install -y

Step 4: Install Docker CE

# yum install -y docker-ce
# docker --version
Docker version 18.03.0-ce, build 0520e24

Step 5: Restart docker service and enable it.

# systemctl restart docker
# systemctl enable docker 
Created symlink from /etc/systemd/system/ to /usr/lib/systemd/system/docker.service.

Step 5: Now run nginx container to test.

# docker run --name webserver -d -p 9090:80 nginx

Now check in web browser with below url



7 thoughts on “Docker CE Installation on Red Hat 7

  1. Hi Zor,

    Are you installing docker ce on cloud or in your local machine ?

    If you are installing in your local machine, as the RedHat is not a free distribution, we need to purchase a licence and activate it.

    If you want to try in cloud, signup to AWS Free tier account and create VM with redhat 7 image.

    Once your task done, terminate the VM to avoid charges.

    Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s