{
  "date": "2018-03-29T20:32:56",
  "slug": "docker-ce-on-oracle-enterprise-linux-7",
  "link": "https://www.dbi-services.com/blog/docker-ce-on-oracle-enterprise-linux-7/",
  "title": {
    "rendered": "Docker-CE on Oracle Enterprise Linux 7"
  },
  "content": {
    "rendered": "<h2>By Franck Pachot</h2>\n<p>.<br />\nHere is how I install the latest Docker version on Oracle Linux 7. You find several blog posts about it which all install &#8216;docker-engine&#8217;. But things move fast in this agile world and docker package name has changed. The Community Edition is now &#8216;docker-ce&#8217; and you want this one to run the latest version.<br />\n<!--more--><br />\nI&#8217;m on OEL 7.4 but should also wotj on RHEL 7:</p>\n<pre><code>[root@VM188 yum]# cat /etc/oracle-release\nOracle Linux Server release 7.4</code></pre>\n<h3>docker-engine</h3>\n<p>If you enable [ol7_addons] you can install &#8216;docker-engine:&#8217;</p>\n<pre><code>\n# yum-config-manager --enable ol7_addons\n# yum info docker-engine\nLoaded plugins: ulninfo\nAvailable Packages\nName        : docker-engine\nArch        : x86_64\nVersion     : 17.06.2.ol\nRelease     : 1.0.1.el7\nSize        : 21 M\nRepo        : ol7_addons/x86_64\nSummary     : The open-source application container engine\nURL         : https://dockerproject.org\nLicense     : ASL 2.0\nDescription : Docker is an open source project to build, ship and run any application as a\n            : lightweight container.\n</code></pre>\n<p>But forget it. That&#8217;s 17.06 which is 6 months old. You should consider Docker as a puppy. 6 month in puppy&#8217;s years is like 3 human years. So many changes happened.</p>\n<p>You can remove all those old things:</p>\n<pre><code>\n# yum remove docker docker-common docker-selinux docker-engine\n</code></pre>\n<h3>docker-ce</h3>\n<p>I&#8217;ve not found &#8216;docker-ce&#8217; on OL7 repositories, as only the Enterprise Edition is there. Then I added the CentOS repo (with yum-config-manager that you can get with yum-utils if you don&#8217;t have it already):</p>\n<pre><code>\nyum -y install yum-utils \nyum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo\n</code></pre>\n<p>Once done, I&#8217;ve just installed Docker Community Edition with:</p>\n<pre><code>\nyum -y install docker-ce\n</code></pre>\n<p>And, at that time I got the version 17.12 easily:</p>\n<pre><code>\n[root@VM188 ~]# yum info docker-ce\nLoaded plugins: ulninfo\nInstalled Packages\nName        : docker-ce\nArch        : x86_64\nVersion     : 17.12.0.ce\nRelease     : 1.el7.centos\nSize        : 123 M\nRepo        : installed\nFrom repo   : docker-ce-stable\nSummary     : The open-source application container engine\nURL         : https://www.docker.com\nLicense     : ASL 2.0\nDescription : Docker is an open source project to build, ship and run any application as a\n            : lightweight container.\n...\n</code></pre>\n<p>But now there&#8217;s a new version available:</p>\n<pre><code>\nAvailable Packages\nName        : docker-ce\nArch        : x86_64\nVersion     : 18.03.0.ce\nRelease     : 1.el7.centos\nSize        : 35 M\nRepo        : docker-ce-stable/x86_64\nSummary     : The open-source application container engine\nURL         : https://www.docker.com\nLicense     : ASL 2.0\nDescription : Docker is an open source project to build, ship and run any application as a\n            : lightweight container.\n</code></pre>\n<p>The problem is that if you want to install docker-ce in this latest version, you will now get:</p>\n<pre><code>\nResolving Dependencies\n--&gt; Running transaction check\n---&gt; Package docker-ce.x86_64 0:18.03.0.ce-1.el7.centos will be installed\n--&gt; Processing Dependency: pigz for package: docker-ce-18.03.0.ce-1.el7.centos.x86_64\n--&gt; Finished Dependency Resolution\nError: Package: docker-ce-18.03.0.ce-1.el7.centos.x86_64 (docker-ce-stable)\n           Requires: pigz\n You could try using --skip-broken to work around the problem\n** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:\n2:microcode_ctl-2.1-22.5.0.3.el7_4.x86_64 has missing requires of kernel\n</code></pre>\n<p>(Ok Google, this is what you need to index&#8230;)</p>\n<h3>pigz</h3>\n<p>Starting from version 18.02 there&#8217;s a new dependency on &#8216;pigz&#8217; for parallel gzip.</p>\n<p>To get this &#8216;pigz&#8217; package from the OL7 repository you need to enable EPEL in /etc/yum.repos.d/public-yum-ol7.repo</p>\n<pre><code>\n[ol7_developer_EPEL]\nname=Oracle Linux $releasever Developement Packages ($basearch)\nbaseurl=http://yum.oracle.com/repo/OracleLinux/OL7/developer_EPEL/$basearch/\ngpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle\ngpgcheck=1\nenabled=1\n</code></pre>\n<p>You can install also use:</p>\n<pre><code>yum-config-manager --enable ol7_developer_EPEL</code></pre>\n<p>Now, I&#8217;m able to install the latest docker-ce:</p>\n<pre><code>\n[root@VM188 yum.repos.d]# yum install docker-ce\nLoaded plugins: ulninfo\nResolving Dependencies\n--&gt; Running transaction check\n---&gt; Package docker-ce.x86_64 0:17.12.0.ce-1.el7.centos will be updated\n---&gt; Package docker-ce.x86_64 0:18.03.0.ce-1.el7.centos will be an update\n--&gt; Processing Dependency: pigz for package: docker-ce-18.03.0.ce-1.el7.centos.x86_64\n--&gt; Running transaction check\n---&gt; Package pigz.x86_64 0:2.3.4-1.el7 will be installed\n--&gt; Finished Dependency Resolution\n&nbsp;\nDependencies Resolved\n&nbsp;\n================================================================================================================================\n Package                  Arch                  Version                                 Repository                         Size\n================================================================================================================================\nUpdating:\n docker-ce                x86_64                18.03.0.ce-1.el7.centos                 docker-ce-stable                   35 M\nInstalling for dependencies:\n pigz                     x86_64                2.3.4-1.el7                             ol7_developer_EPEL                 80 k\n&nbsp;\nTransaction Summary\n================================================================================================================================\nInstall             ( 1 Dependent package)\nUpgrade  1 Package\n&nbsp;\nTotal download size: 35 M\nIs this ok [y/d/N]: y\n</code></pre>\n<h3>Oracle Database on Docker</h3>\n<p>You may wonder why I install Docker on Oracle Linux rather than CentOS. The <a href=\"https://support.oracle.com/epmos/faces/DocContentDisplay?id=2216342.1\" target=\"_blank\" rel=\"noopener noreferrer\">MOS Doc ID 2216342.1</a> mentions that <i>Oracle will support customers running Oracle Database (single instance) in Docker containers running on Oracle Linux 7 with UEK4 or Red Hat Enterprise Linux 7</i>.</p>\n<p>If you want to validate your Docker install for running Oracle Database, the easiest is to use the image build script provided by Oracle:</p>\n<pre><code>\ngit clone https://github.com/oracle/docker-images.git\ncd ./docker-images/OracleDatabase/SingleInstance/dockerfiles/\n# download and move linuxx64_12201_database.zip is in 12.2.0.1 subdirectory\nsh buildDockerImage.sh -v 12.2.0.1 -e\n</code></pre>\n<p>Those are maintained by Gerald Venzl, Oracle product manager for database development, so they are obviously the best way to run Oracle Database on Docker. You can read all related <a href=\"https://fr.slideshare.net/gvenzl/oracle-database-on-docker-best-practices\" target=\"_blank\" rel=\"noopener noreferrer\">best practices</a> from the same author. Once you have that running, you have validated your environment and you can customize further if you want.</p>\n",
    "protected": false
  }
}
