0

Followed the instruction to set up proxy of boot2docker , Getting the following FATAs, any clue

FATA[0020] Get https://index.docker.io/v1/repositories/library/busybox/images: Forbidden while trying to pulling images

FATA[0020] Error response from daemon: Server Error: Post https://index.docker.io/v1/users/: Forbidden  while trying to login

FATA[0000] Error response from daemon: Get https://index.docker.io/v1/search?q=ubuntu: Forbidden - while searching for images

updated to include result of curl -v https://index.docker.io:443

* Rebuilt URL to: https://index.docker.io:443/
* About to connect() to proxy 34363bd0dd54 port 8099 (#0)
* Trying 192.168.59.3...
* Adding handle: conn: 0x9adbad8
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x9adbad8) send_pipe: 1, recv_pipe: 0
* Connected to 34363bd0dd54 (192.168.59.3) port 8099 (#0)
* Establish HTTP proxy tunnel to index.docker.io:443
> CONNECT index.docker.io:443 HTTP/1.1
> Host: index.docker.io:443
> User-Agent: curl/7.33.0
> Proxy-Connection: Keep-Alive
> 
< HTTP/1.1 403 Forbidden
< Server: squid/3.4.9
< Mime-Version: 1.0
< Date: Fri, 29 May 2015 17:56:22 GMT
< Content-Type: text/html
< Content-Length: 3151
< X-Squid-Error: ERR_ACCESS_DENIED 0
< Vary: Accept-Language
< Content-Language: en
< X-Cache: MISS from localhost
< Via: 1.1 localhost (squid/3.4.9)
< Connection: keep-alive
< 
* Received HTTP code 403 from proxy after CONNECT
* Connection #0 to host 34363bd0dd54 left intact
curl: (56) Received HTTP code 403 from proxy after CONNECT

Looks like it is a proxy issue, I am running a proxy server on the host machine, accessing it by its host name in boot2docker VM 's http_proxy and https_proxy butcurl host_proxy:port` works with no issues

Community
  • 1
  • 1
iamiddy
  • 3,015
  • 3
  • 30
  • 33
  • Can you try `docker login`? Although, it shouldn't be required, your error message says `Forbidden while trying to login`. – Sabin May 29 '15 at 17:24
  • did all of that , 'login` was one of those interaction – iamiddy May 29 '15 at 17:28
  • Can you please include the result of `curl -v https://index.docker.io:443`, in your question? It would help users understand your proxy server is working properly. – Sabin May 29 '15 at 17:30
  • included the `curl -v https://index.docker.io:443` result – iamiddy May 29 '15 at 17:43

1 Answers1

0

I was experiencing the same issue where I would get a 403 error when trying to get lxc-docker to install from get.docker.com (it failed because it could not complete apt-get update. In my case, I have the following setup:

  • VM Provider: VirtualBox (Ubuntu 14.04 (Trusty))
  • Environment: Vagrant
  • Provisioner: chef-zero (via Vagrant)
  • PROXY: At first I had forgotten about this, but I am running apt-cacher-ng on my host machine (my Macbook Pro) to keep data downloads to a minimum when I'm running apt-get install on Vagrant VM's. In a nutshell, apt-cacher-ng sets up an apt mirror on my Mac for Ubuntu VM's to pull packages from.

I realized that apt-cacher-ng doesn't support SSL repositories (https), but does support normal http repositories. Since the Docker repository uses https, I had to find a workaround.

Before I fixed anything, I had the following in my /etc/apt/apt.conf.d/10mirror file in my Ubuntu VM's (localip is the IP address of my Mac which runs the apt-cacher-ng server):

Acquire::http { Proxy "http://#{localip}:3142"; };

The above line means my Ubuntu VM's were getting packages through apt-cacher-ng, but failing when a repository used https. By adding the following line beneath that line, things then started to work normally:

Acquire::https { Proxy \false"; };

At this point, the contents of /etc/apt/apt.conf.d/10mirror are as follows:

Acquire::http { Proxy "http://#{localip}:3142"; };

Acquire::https { Proxy \false"; };

Now, run apt-get update and then Docker installs successfully and I'm back to normal testing. In case you are using Vagrant to set up the 10mirror file, here are the lines I have in my Vagrantfile which do the job:

oak.vm.provision "shell", inline: "echo 'Acquire::http { Proxy \"http://#{localip}:3142\"; };' > /etc/apt/apt.conf.d/10mirror"
oak.vm.provision "shell", inline: "echo 'Acquire::https { Proxy \"false\"; };' >> /etc/apt/apt.conf.d/10mirror";
KLaw
  • 1,619
  • 1
  • 12
  • 7