Skip to content

Instantly share code, notes, and snippets.

@amshinde
Last active April 4, 2019 01:09
Show Gist options
  • Save amshinde/ca458d9a8b69394c83906feb2b122263 to your computer and use it in GitHub Desktop.
Save amshinde/ca458d9a8b69394c83906feb2b122263 to your computer and use it in GitHub Desktop.
Docker with proxy

Getting docker to work with corporate proxy

Docker's conf file /etc/docker/daemon.json :

{  
   "dns":[  
      "10.248.2.1",
      "10.22.224.196"
   ],
   "dns-search":[  
      "a.domain.com"
   ],
   "proxies":{  
      "default":{  
         "httpProxy":"http://corp-domain.com:portnum",
         "httpsProxy":"http://corp-domain.com:portnum",
         "noProxy":"localhost"
      }
   }
}

Restart docker:

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