X

Deep dive into various configurations with Oracle Weblogic Server

  • September 17, 2018

A Simple Guide to docker installation on Oracle Linux 7.5 [Updated Oct 2019]

Puneeth Prakash
Principal Software Engineer

Below are the steps to install docker using Oracle YUM repository:

Step 1. Set your proxy :

Command : export http_proxy=xxx.xxx.xxx.xxx:80

Command : export https_proxy=xxx.xxx.xxx.xxx:80

Step 2. Take a backup of existing public-yum-ol7.repo :

Command : cd /etc/yum.repos.d/

Optional Command : mv /etc/yum.repos.d/public-yum-ol7.repo /etc/yum.repos.d/public-yum-ol7.repo_org1

Step 3. Download the latest public-yum-ol7.repo from Oracle YUM repository:

Command : wget http://yum.oracle.com/public-yum-ol7.repo

Step 4. Make the following changes in your public-yum-ol7.repo file:

Command : 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_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_optional_latest]
name=Oracle Linux $releasever Optional Latest ($basearch)
baseurl=https://yum.oracle.com/repo/OracleLinux/OL7/optional/latest/$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

Step 5. Reboot your machine:

Command : systemctl reboot

Step 6. Install docker using Oracle yum repository:

Command :  yum install docker-engine

NOTE:

Refrence: https://blogs.oracle.com/linux/modularizing-the-oracle-linux-yum-server-repository-configurations-breaking-up-is-hard-to-do

"

Beginning on 18 January 2019:

- the existing repo files (public-yum-ol7.repo and public-yum-ol6.repo) for yum.oracle.com will no longer be updated, in favor of smaller repo files that are more targeted in scope
- running a yum update on an Oracle Linux 6 or Oracle Linux 7 system will automatically install .repo files relevant to your system
- it will be easier to enable specific repositories for Oracle Linux yum server and to keep your yum repository definitions up to date
- to complete the transition from the legacy .repo file you must run the script: /usr/bin/ol_yum_configure.sh after it is installed.

"

Some users have reported that they see the error "no package docker-engine available" at this stage :

Follow the below commands to resolve this issue :

a) Check if the addons repository is enabled.

Command : yum repolist

b) If the addons repository is not enabled then execute the below command :

Command : yum-config-manager --enable *addons

c) Now check if the addons repository is enabled using the command "yum repolist".

d) Try to download/install docker from yum repository again, using the command "yum install docker-engine".

Step 7. Enable docker service:

Command : systemctl enable docker

Step 8. Start docker service:

Command : systemctl start docker

Step 9. Check the status:

Command : systemctl status docker.service

Step 10. Check if docker client and server was installed successfully:

Command : docker version

Step 11. Try to login to Docker hub:

Command : docker login

Run the following commands If you are unable to connect to the Docker hub:

  • Command : mkdir -p /etc/systemd/system/docker.service.d
  • Command : vi /etc/systemd/system/docker.service.d/http-proxy.conf and append the following:

[Service]
Environment="HTTP_PROXY=xxx.xxx.xxx.xxx:80" "HTTPS_PROXY=xxx.xxx.xxx.xxx:80" "NO_PROXY=localhost,127.0.0.1"

  • Command : systemctl daemon-reload
  • Command : systemctl restart docker
  • check if proxy was set properly:

Command : systemctl show --property=Environment docker

  • Try to login again using :

Command : docker login

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.