Install Docker on OEL 7.5

Credit:  This post was originally duplicated from a post at:  Oracle Blogs

If this link goes away, here is an offline copy.

Recently a new Docker release 17.03.1.ce was announced for Oracle Linux 7. In the example below, I’m using Oracle Linux yum server to provide the software updates. With a few quick steps, you’ll be able to install the latest Docker release.

First, update your Oracle Linux 7 instance with correct yum setting. To install the latest Docker release (17.03.1.ce), you need ol7_latest, ol7_uekr4 and ol7_addons enabled.

# cd /etc/yum.repos.d/
# wget
# vi public-yum-ol7.repo

name=Oracle Linux $releasever Latest ($basearch)

name=Latest Unbreakable Enterprise Kernel Release 4 for Oracle Linux $releasever ($basearch)

name=Oracle Linux $releasever Add ons ($basearch)

Next you simply use yum install to start the installation.

# yum install docker-engine
Loaded plugins: langpacks, ulninfo
Resolving Dependencies
--> Running transaction check
---> Package docker-engine.x86_64 0:17.03.1.ce-3.0.1.el7 will be installed
--> Processing Dependency: docker-engine-selinux >= 17.03.1.ce-3.0.1.el7 for package: docker-engine-17.03.1.ce-3.0.1.el7.x86_64
--> Running transaction check
---> Package docker-engine-selinux.noarch 0:17.03.1.ce-3.0.1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

 Package                            Arch                Version                           Repository               Size
 docker-engine                      x86_64              17.03.1.ce-3.0.1.el7              ol7_addons               19 M
Installing for dependencies:
 docker-engine-selinux              noarch              17.03.1.ce-3.0.1.el7              ol7_addons               28 k

Transaction Summary
Install  1 Package (+1 Dependent package)

Total download size: 19 M
Installed size: 65 M
Is this ok [y/d/N]: y
Downloading packages:
(1/2): docker-engine-selinux-17.03.1.ce-3.0.1.el7.noarch.rpm                                     |  28 kB  00:00:00     
(2/2): docker-engine-17.03.1.ce-3.0.1.el7.x86_64.rpm                                             |  19 MB  00:00:48     
Total                                                                                   397 kB/s |  19 MB  00:00:48     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : docker-engine-selinux-17.03.1.ce-3.0.1.el7.noarch                                                    1/2 
libsemanage.semanage_direct_install_info: Overriding docker module at lower priority 100 with module at priority 400.
  Installing : docker-engine-17.03.1.ce-3.0.1.el7.x86_64                                                            2/2 
  Verifying  : docker-engine-selinux-17.03.1.ce-3.0.1.el7.noarch                                                    1/2 
  Verifying  : docker-engine-17.03.1.ce-3.0.1.el7.x86_64                                                            2/2 

  docker-engine.x86_64 0:17.03.1.ce-3.0.1.el7                                                                           

Dependency Installed:
  docker-engine-selinux.noarch 0:17.03.1.ce-3.0.1.el7                                                                   


Once the installation is completed, you start the docker service.

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

# systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/docker.service.d
   Active: active (running) since Fri 2017-07-14 21:53:58 PDT; 3min 18s ago
 Main PID: 13813 (dockerd)
   CGroup: /system.slice/docker.service
           ├─13813 /usr/bin/dockerd --selinux-enabled
           └─13818 docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interva...

Then you log into Oracle Container Registry, trusted source of Oracle software as Docker containers, to pull the appropriate Docker containers.

# docker login
Login Succeeded

# docker pull
6.9: Pulling from os/oraclelinux
88710002ea6c: Pull complete 
Digest: sha256:9ee6b162062040c59f6bdc7fd47a9c55f08695c898d517b99bb6d48a0ed9ccf2
Status: Downloaded newer image for

# docker pull
Using default tag: latest
latest: Pulling from java/serverjre
78a05301de27: Pull complete 
1bd2d038d806: Pull complete 
Digest: sha256:cd18dd865cfd0a3b95732eee6e528ff86a96157221a47af48b388b316b1d4b4b
Status: Downloaded newer image for

# docker images
REPOSITORY                                     TAG                 IMAGE ID            CREATED             SIZE   6.9                 7a4a8c404142        3 weeks ago         171 MB   latest              289ea39a2a2c        6 weeks ago         377 MB

Leave a Reply