Skip to content

Instantly share code, notes, and snippets.

@rmpestano
Created January 7, 2019 13:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmpestano/1373c09242778926b4e5384e986696fd to your computer and use it in GitHub Desktop.
Save rmpestano/1373c09242778926b4e5384e986696fd to your computer and use it in GitHub Desktop.
Configure Docker on ubuntu under corporate proxy
== 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