Child pages
  • Docker installation and configuration
Skip to end of metadata
Go to start of metadata

When researchers need to install dockers on a VM. Follow the steps below.



Before getting started, make sure squid proxy has been properly set and VM can access Internet. In /etc/profile, add

export http_proxy=
export https_proxy=

Install Docker CE


RHEL doesn't officially support docker CE. But it is still possible to install docker CE on it. The latest 17.06 has tricky dependency issues. It's recommended to use earlier 17.03 version.

Run the following script from rancher. 

curl | sh


Run the following script from docker to get the latest docker.

curl | sh

Configure registry proxy

To enable docker pull behind the proxy, please refer to this article. In a short sentence, create a file /etc/systemd/system/docker.service.d/proxy.conf with the content

Environment="HTTPS_PROXY=" "HTTP_PROXY=" "NO_PROXY=localhost,"

and verify the change by running the following commands.

systemctl daemon-reload
systemctl restart docker
systemctl show --property=Environment docker
docker run hello-world

Configure proxy for container

To allow apps inside a docker container to use the proxy server, in /etc/default/docker file, add the following line

export http_proxy="
export https_proxy=

Finally, reboot docker service.