2

I've just installed a fresh Xenial on a server box and almost immediately tried to install Docker on it.

The Docker installation page says that you have to create a /etc/apt/sources.list.d/docker.list file and add just the docker repo source in it:

deb https://apt.dockerproject.org/repo ubuntu-xenial main

then, just going through the normal apt-get update & install process. This step is usually very easy but on this brand new xenial, the update step timeouts all the time:

Failed to fetch https://apt.dockerproject.org/repo/dists/ubuntu-xenial/InRelease  Connection timed out after 120000 milliseconds

The important point here is that Docker tells me that they don't have a InRelease repo. Normally, an apt-get update should try the InRelease step, not find a signed inline source and should then try the the Release source.

My problem is that my brand new Xenial stops there without trying the Release source.

How can I force Ubuntu to check the https://apt.dockerproject.org/repo/dists/ubuntu-xenial/Release source instead of https://apt.dockerproject.org/repo/dists/ubuntu-xenial/InRelease ?

If needed, here is the uname -a result:

Linux sd-83589 4.4.0-22-generic #40-Ubuntu SMP Thu May 12 22:03:46 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

I had no problem installing other packages (zsh, screen, etc..)

Please feel free to ask me any additional information: I'm way over my knowledge on this so I probably have forgotten something...

1
  • 1
    You are getting a Connection Timed Out, not an error indicating that Docker does not have an InRelease repo. You probably have a problem connecting to apt.dockerproject.org on port 443, you should test and fix that first.
    – Law29
    Jun 8 '16 at 17:21
0

Thanks to @Law29 I learn that some updates are made with HTTPS when others use HTTP :/

I could check with curl that HTTPS request wouldn't reach the server.

Turns out is was my firewall which was not configured to accept port 443 requests... Adding the right lines solved the problem ! Thanks @Law29 !

0

I've the same issue. The /etc/apt/apt.conf causes the problem:

Acquire::http::Proxy "http://mirrors.aliyun.com/";

After deleting this file, everything is ok now.


Updated

I can also bypass the docker repo by adding another line:

Acquire::http::Proxy "http://mirrors.aliyun.com/";
Acquire::http::Proxy::apt.dockerproject.org DIRECT;
1
  • Be careful on this, as the /etc/apt/apt.conf is used for local apt configuration; so if you delete it, some package won't be updated afterwards. In your case, it seems that aliyum.com is a cloud service so if you still use their tools, you'll probably need the file back !
    – gfd
    Jan 12 '17 at 14:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.