Created
January 7, 2019 13:14
-
-
Save rmpestano/1373c09242778926b4e5384e986696fd to your computer and use it in GitHub Desktop.
Configure Docker on ubuntu under corporate proxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
== Install | |
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --keyserver-options http-proxy=localhost:3128 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
sudo apt-get install docker-ce | |
== Proxy config | |
sudo mkdir -p /etc/systemd/system/docker.service.d | |
sudo gedit /etc/systemd/system/docker.service.d/http-proxy.conf | |
[Service] | |
Environment="HTTP_PROXY=http://localhost:3128/" | |
== Certificate | |
export certificado from: https://production.cloudflare.docker.com/ | |
add .crt sufix, eg: remame file to 'docker.crt' | |
copy /usr/share/ca-certificates/: | |
sudo cp docker.crt /usr/share/ca-certificates/ | |
sudo update-ca-certificates --fresh | |
sudo dpkg-reconfigure ca-certificates (don't forget to check imported cert) | |
== Run | |
docker run -it hello-world | |
Status: Downloaded newer image for hello-world:latest | |
Hello from Docker! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment