apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
apt-key fingerprint 0EBFCD88
lsb_release -cs
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt-get update
apt-get install docker-ce
root@Ubuntu16:~# mkdir -p /etc/systemd/system/docker.service.d/
root@Ubuntu16:~# vim /etc/systemd/system/docker.service.d/http-proxy.conf
root@Ubuntu16:~# cat /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=http://10.144.1.10:8080"
Environment="HTTPS_PROXY=https://10.144.1.10:8080"
Environment="FTP_PROXY=ftp://10.144.1.10:8080"
root@Ubuntu16:~#
root@Ubuntu16:~# systemctl daemon-reload
root@Ubuntu16:~# systemctl restart docker
root@Ubuntu16:~#
root@Ubuntu16:~# systemctl show --property=Environment docker
Environment=HTTP_PROXY=http://10.144.1.10:8080 HTTPS_PROXY=https://10.144.1.10:8080 FTP_PROXY=ftp://10.144.1.10:8080
root@Ubuntu16:~#