Skip to content

Instantly share code, notes, and snippets.

@jeffersonsouza
Forked from owainlewis/docker-proxy.md
Created October 6, 2017 20:13
Show Gist options
  • Save jeffersonsouza/c9ed0e2e148afd661494b71baa34b925 to your computer and use it in GitHub Desktop.
Save jeffersonsouza/c9ed0e2e148afd661494b71baa34b925 to your computer and use it in GitHub Desktop.
Set docker proxy on Ubuntu 16.04

How to setup docker behing a HTTP proxy

mkdir /etc/systemd/system/docker.service.d

sudo touch /etc/systemd/system/docker.service.d/http-proxy.conf

Add proxy info

[Service]
Environment="HTTP_PROXY=http://emea-proxy.uk.oracle.com:80"
Environment="HTTPS_PROXY=http://emea-proxy.uk.oracle.com:80"

Restart and flush

sudo sysetmctl daemon-reload
sudo systemctl restart docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment