I installed Docker on my Ubuntu 13.10 (Saucy Salamander) and when I type in my console:
sudo docker pull busybox
I get the following error:
Pulling repository busybox
2014/04/16 09:37:07 Get https://index.docker.io/v1/repositories/busybox/images: dial tcp: lookup index.docker.io on 127.0.1.1:53: no answer from server
Docker version:
$ sudo docker version
Client version: 0.10.0
Client API version: 1.10
Go version (client): go1.2.1
Git commit (client): dc9c28f
Server version: 0.10.0
Server API version: 1.10
Git commit (server): dc9c28f
Go version (server): go1.2.1
Last stable version: 0.10.0
I am behind a proxy server with no authentication, and this is my /etc/apt/apt.conf
file:
Acquire::http::proxy "http://192.168.1.1:3128/";
Acquire::https::proxy "https://192.168.1.1:3128/";
Acquire::ftp::proxy "ftp://192.168.1.1:3128/";
Acquire::socks::proxy "socks://192.168.1.1:3128/";
What am I doing wrong?
On Ubuntu 14.04 (Trusty Tahr) with Docker 1.9.1, I just uncommented the
http_proxy
line, updated the value and then restarted the Docker service.and then
To solve the problem with curl in Docker build, I added the following inside the Dockerfile:
Note that the ENV statement is BEFORE the RUN statement.
And in order to make the Docker daemon able to access the Internet (I use Kitematic with boot2docker), I added the following into
/var/lib/boot2docker/profile
:Then I restarted Docker with
sudo /etc/init.d/docker restart
.On Ubuntu you need to set the http_proxy for the Docker daemon, not the client process. This is done in
/etc/default/docker
(see here).On RHEL6.6 only this works (note the use of
export
):/etc/sysconfig/docker
NOTE: Both can use the
http
protocol.)Thanks to https://crondev.com/running-docker-behind-proxy/
On CentOS the configuration file for Docker is at:
Adding the below line helped me to get the Docker daemon working behind a proxy server:
Simply setting proxy environment variables did not help me in version 1.0.1... I had to update the
/etc/default/docker.io
file with the correct value for the "http_proxy" variable.