Docker on Oracle Linux 6 and proxy configuration
The docker documentation only explains how to configure it on Linux 7 (using systemd). This blog describes how to configure it on Oracle Linux 6 (using UEK)
Install docker using yum. For this, you need to create a new yum repository file (in /etc/yum.repos.d) with the following content:
In /etc/sysconfig/docker add the following line:
Install docker using yum. For this, you need to create a new yum repository file (in /etc/yum.repos.d) with the following content:
[dockerrepo]Install docker with:
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/oraclelinux/6
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
yum install docker-engineTo start docker, run
service docker startConfiguration of the docker daemon is in /etc/sysconfig/docker. If sitting behind a proxy server and you want to download docker images from the "outside world", you need to configure http_proxy for the daemon:
In /etc/sysconfig/docker add the following line:
export http_proxy="http://<proxy-server>:<port>"The command "export" is required for this setting to work! After modifying /etc/sysconfig/docker, the daemon needs to be restarted:
service docker restartNow you can download the docker basic sample hello-world:
docker run hello-worldor
docker pull hello-worldNow docker should work on Oracle Linux 6.