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
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.
Run the following script from docker to get the latest docker.
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
and verify the change by running the following commands.
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
Finally, reboot docker service.