Tuesday, October 18, 2016

Oracle Linux7 Docker Install


Oracle Linux Docker Install

source: https://docs.docker.com/engine/installation/linux/oracle/
note:
If you want to install Docker version 1.9 or later, configure the system to use the Unbreakable Enterprise Kernel Release 4 (UEK R4) and boot the system with this kernel:

If your system is registered with ULN, disable access to the ol7_x86_64_UEKR3 channel and enable access to the ol7_x86_64_UEKR4 channel.

# grep '^menuentry' /boot/grub2/grub.cfg
if UEK is entry 1
# grub2-set-default 1
# grub2-mkconfig -o /boot/grub2/grub.cfg 

If you use the Oracle Yum repository, disable the ol7_UEKR3 repository and enable the ol7_UEKR4 repository in the /etc/yum.repos.d/public-yum-ol7.repo file, for example:

$ sudo yum update
$ cat >/etc/yum.repos.d/docker.repo <<-eof baseurl="https:</span" dockerrepo="" name="Docker" repository="">//yum.dockerproject.org/repo/main/oraclelinux/7 enabled=1 gpgcheck=1 gpgkey=https://yum.dockerproject.org/gpg EOF
$ sudo yum install docker-engine Loaded plugins: langpacks, ulninfo dockerrepo | 2.9 kB 00:00:00 dockerrepo/primary_db | 20 kB 00:00:01 Resolving Dependencies --> Running transaction check ---> Package docker-engine.x86_64 0:1.12.0-1.0.2.el7 will be updated ---> Package docker-engine.x86_64 0:1.12.2-1.el7 will be an update --> Processing Dependency: docker-engine-selinux >= 1.12.2-1.el7 for package: docker-engine-1.12.2-1.el7.x86_64 --> Running transaction check ---> Package docker-engine-selinux.noarch 0:1.12.0-1.0.2.el7 will be updated ---> Package docker-engine-selinux.noarch 0:1.12.2-1.el7 will be an update --> Finished Dependency Resolution Dependencies Resolved ======================================================================================== Package Arch Version Repository Size ======================================================================================== Updating: docker-engine x86_64 1.12.2-1.el7 dockerrepo 19 M Updating for dependencies: docker-engine-selinux noarch 1.12.2-1.el7 dockerrepo 29 k Transaction Summary ======================================================================================== Upgrade 1 Package (+1 Dependent package) Total download size: 19 M Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for dockerrepo
warning: /var/cache/yum/x86_64/7Server/dockerrepo/packages/docker-engine-selinux-1.12.2-1.el7.noarch.rpm: Header V4 RSA/SHA512 Signature, key ID 2c52609d: NOKEY
Public key for docker-engine-selinux-1.12.2-1.el7.noarch.rpm is not installed
(1/2): docker-engine-selinux-1.12.2-1.el7.noarch.rpm             |  29 kB  00:00:01     
(2/2): docker-engine-1.12.2-1.el7.x86_64.rpm                     |  19 MB  00:00:41     ----------------------------------------------------------------------------------------
Total                                                      466 kB/s |  19 MB  00:41     
Retrieving key from https://yum.dockerproject.org/gpg
Importing GPG key 0x2C52609D:
 Userid     : "Docker Release Tool (releasedocker) "
 Fingerprint: 5811 8e89 f3a9 1289 7c07 0adb f762 2157 2c52 609d
 From       : https://yum.dockerproject.org/gpg
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : docker-engine-selinux-1.12.2-1.el7.noarch                          1/4 
  Updating   : docker-engine-1.12.2-1.el7.x86_64                                  2/4 
  Cleanup    : docker-engine-1.12.0-1.0.2.el7.x86_64                              3/4 
  Cleanup    : docker-engine-selinux-1.12.0-1.0.2.el7.noarch                      4/4 
  Verifying  : docker-engine-1.12.2-1.el7.x86_64                                  1/4 
  Verifying  : docker-engine-selinux-1.12.2-1.el7.noarch                          2/4 
  Verifying  : docker-engine-1.12.0-1.0.2.el7.x86_64                              3/4 
  Verifying  : docker-engine-selinux-1.12.0-1.0.2.el7.noarch                      4/4 

Updated:
  docker-engine.x86_64 0:1.12.2-1.el7                                                   
Dependency Updated:
  docker-engine-selinux.noarch 0:1.12.2-1.el7                                           

Complete!
$ sudo systemctl start docker.service
$ sudo docker run hello-world

No comments:

Post a Comment