I am using Ubuntu 16.04.4 LTS and my proxy configuration worked fine with this version:
> docker --version
Docker version 17.12.0-ce, build c97c6d6
I recently did and apt-get upgrade
and it pulled a new version of docker-ce:
> docker --version
Docker version 18.03.1-ce, build 9ee9f40
Now I get failures of the form:
> docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: proxyconnect tcp: dial tcp: lookup http on 10.198.0.199:53: no such host.
(10.198.0.199 is our company's internal DNS server)
Here are my contents of my /etc/systemd/system/docker.service.d/10_docker_proxy.conf
[Service]
Environment=HTTP_PROXY=http://DOMAIN\\username:[email protected]:9091
Environment=HTTPS_PROXY=http://DOMAIN\\username:[email protected]:9091
I tried single and double quoting the HTTP_PROXY and HTTPS_PROXY variables:
Environment="HTTP_PROXY=http://DOMAIN\\username:[email protected]:9091"
Environment="HTTPS_PROXY=http://DOMAIN\\username:[email protected]:9091"
and
Environment='HTTP_PROXY=http://DOMAIN\\username:[email protected]:9091'
Environment='HTTPS_PROXY=http://DOMAIN\\username:[email protected]:9091'
with the same error.
It looks like is related to the DOMAIN\\
part of the username, because if I do this (i.e. don't supply a password):
Environment=HTTP_PROXY=http://DOMAIN\\[email protected]:9091
Environment=HTTPS_PROXY=http:/DOMAIN\\[email protected]:9091
I get the same proxyconnect tcp: dial tcp: lookup http on 10.198.0.199:53: no such host
error,
but if I leave off the DOMAIN:
Environment=HTTP_PROXY=http://[email protected]:9091
Environment=HTTPS_PROXY=http:/[email protected]:9091
I get
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: authenticationrequired.
Something needs to be tweaked with the URL parsing library?
In the mean time I will be reverting to a working docker:
sudo apt-get install docker-ce=17.12.0~ce-0~ubuntu