-->
  • Recent Articles

    How to Install Docker on Oracle Linux 7

               In this article, we will be using   Oracle Linux yum server to provide the software updates. With following steps, you will be able to install the latest Docker release.

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

    [root@dockerserver ~]# cd /etc/yum.repos.d/

    [root@dockerserver yum.repos.d]# wget http://yum.oracle.com/public-yum-ol7.repo

    --2021-04-27 14:42:20--  http://yum.oracle.com/public-yum-ol7.repo

    Resolving yum.oracle.com (yum.oracle.com)... 72.247.97.172

    Connecting to yum.oracle.com (yum.oracle.com)|72.247.97.172|:80... connected.

    HTTP request sent, awaiting response... 200 OK

    Length: 16402 (16K) [text/plain]

    Saving to: ‘public-yum-ol7.repo’

     

    100%[====================================================================================>] 16,402      --.-K/s   in 0s

     

    2021-04-27 14:42:21 (153 MB/s) - ‘public-yum-ol7.repo’ saved [16402/16402]

     

    [root@dockerserver yum.repos.d]#

    2. vi public-yum-ol7.repo and change "enabled=0" to "enabled=1" for all four repos as given above and save the file.

    [root@dockerserver yum.repos.d]# vi public-yum-ol7.repo

    [ol7_latest]

    name=Oracle Linux $releasever Latest ($basearch)

    baseurl=https://yum.oracle.com/repo/OracleLinux/OL7/latest/$basearch/

    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle

    gpgcheck=1

    enabled=1

     

    --

    [ol7_UEKR5]

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

    baseurl=https://yum.oracle.com/repo/OracleLinux/OL7/UEKR5/$basearch/

    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle

    gpgcheck=1

    enabled=1

     

    [ol7_UEKR4]

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

    baseurl=https://yum.oracle.com/repo/OracleLinux/OL7/UEKR4/$basearch/

    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle

    gpgcheck=1

    enabled=1

     

    --

    [ol7_addons]

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

    baseurl=https://yum.oracle.com/repo/OracleLinux/OL7/addons/$basearch/

    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle

    gpgcheck=1

    enabled=1

    3. Next you simply use yum install to start the installation.

    yum install docker-engine -y

    [root@dockerserver yum.repos.d]# yum install docker-engine -y

    Loaded plugins: langpacks, ulninfo

    Resolving Dependencies

    --> Running transaction check

    ---> Package docker-engine.x86_64 0:19.03.11.ol-8.el7 will be installed

    --> Processing Dependency: container-selinux >= 2:2.77 for package: docker-engine-19.03.11.ol-8.el7.x86_64

    --> Processing Dependency: containerd for package: docker-engine-19.03.11.ol-8.el7.x86_64

    --> Processing Dependency: runc for package: docker-engine-19.03.11.ol-8.el7.x86_64

    --> Processing Dependency: docker-cli for package: docker-engine-19.03.11.ol-8.el7.x86_64

    --> Running transaction check

    ---> Package container-selinux.noarch 2:2.107-3.el7 will be installed

    ---> Package containerd.x86_64 0:1.3.9-2.el7 will be installed

    ---> Package docker-cli.x86_64 0:19.03.11.ol-8.el7 will be installed

    ---> Package runc.x86_64 0:1.0.0-93.rc93.el7 will be installed

    --> Processing Dependency: criu for package: runc-1.0.0-93.rc93.el7.x86_64

    --> Running transaction check

    ---> Package criu.x86_64 0:3.12-2.el7 will be installed

    --> Finished Dependency Resolution

     

    Dependencies Resolved

     

    ==============================================================================================================================

     Package                           Arch                   Version                            Repository                  Size

    ==============================================================================================================================

    Installing:

     docker-engine                     x86_64                 19.03.11.ol-8.el7                  ol7_addons                  21 M

    Installing for dependencies:

     container-selinux                 noarch                 2:2.107-3.el7                      ol7_addons                  39 k

     containerd                        x86_64                 1.3.9-2.el7                        ol7_addons                  27 M

     criu                              x86_64                 3.12-2.el7                         ol7_latest                 452 k

     docker-cli                        x86_64                 19.03.11.ol-8.el7                  ol7_addons                  34 M

     libnet                            x86_64                 1.1.6-7.el7                        ol7_latest                  57 k

     protobuf-c                        x86_64                 1.0.2-3.el7                        ol7_latest                  27 k

     runc                              x86_64                 1.0.0-93.rc93.el7                  ol7_addons                 3.7 M

     

    Transaction Summary

    ==============================================================================================================================

    Install  1 Package (+7 Dependent packages)

     

    Total download size: 87 M

    Installed size: 355 M

    Downloading packages:

    (1/8): container-selinux-2.107-3.el7.noarch.rpm                                                        |  39 kB  00:00:00

    (2/8): criu-3.12-2.el7.x86_64.rpm                                                                      | 452 kB  00:00:00

    Running transaction check

    Running transaction test

    Transaction test succeeded

    Running transaction

      Installing : 2:container-selinux-2.107-3.el7.noarch                                                                     1/8


    Installed:

      docker-engine.x86_64 0:19.03.11.ol-8.el7

     

    Dependency Installed:

      container-selinux.noarch 2:2.107-3.el7        containerd.x86_64 0:1.3.9-2.el7        criu.x86_64 0:3.12-2.el7

      docker-cli.x86_64 0:19.03.11.ol-8.el7         libnet.x86_64 0:1.1.6-7.el7            protobuf-c.x86_64 0:1.0.2-3.el7

      runc.x86_64 0:1.0.0-93.rc93.el7

     

    Complete!

    [root@dockerserver yum.repos.d]#

    Find Articles on troubleshooting Other OCI issues.

    4. Now Start and enable Docker Service.

    [root@dockerserver yum.repos.d]# systemctl start docker

    [root@dockerserver yum.repos.d]# systemctl enable docker

    Created symlink from

    /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.

    [root@dockerserver yum.repos.d]# systemctl status docker

    ● docker.service - Docker Application Container Engine

       Loaded: loaded

    (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)

       Active: active (running)

    since Tue 2021-04-27 16:58:40 GMT; 20s ago

    No comments