0

I know this question have been asked at several other places too but I have read most of those posts but still can't figure out solution for my problem here. I am trying to execute apt-get update command in my Ubuntu image created by Docker for Windows. Here are the steps I followed:

  1. Pulled an image of Ubuntu 14.04 and ran it.
  2. Then attached my image to a container and then ran it to open the Ubuntu terminal.

In terminal, I am trying to do

`apt-get update'

but it fails with below message:

Err http://archive.ubuntu.com trusty InRelease

Err http://archive.ubuntu.com trusty-updates InRelease

Err http://archive.ubuntu.com trusty-backports InRelease

Err http://archive.ubuntu.com trusty Release.gpg
  Unable to connect to archive.ubuntu.com:http: [IP: 99.999.99.999.99]
Err http://archive.ubuntu.com trusty-updates Release.gpg
  Unable to connect to archive.ubuntu.com:http: [IP: 99.999.99.999.99]
Err http://archive.ubuntu.com trusty-backports Release.gpg
  Unable to connect to archive.ubuntu.com:http: [IP: 99.999.99.999.99]
Err http://security.ubuntu.com trusty-security InRelease

Err http://security.ubuntu.com trusty-security Release.gpg
  Unable to connect to security.ubuntu.com:http: [IP: 99.100.99.100.99]
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/InRelease

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-backports/InRelease

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/InRelease

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg  Unable to connect to archive.ubuntu.com:http: [IP: 99.999.99.999.99]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg  Unable to connect to archive.ubuntu.com:http: [IP: 99.999.99.999.99]

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-backports/Release.gpg  Unable to connect to archive.ubuntu.com:http: [IP: 99.999.99.999.99]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg  Unable to connect to security.ubuntu.com:http: [IP: 99.100.99.100.99]

W: Some index files failed to download. They have been ignored, or old ones used instead.

I looked up to various solutions that people have mentioned on this community and a handful of others as well, but no luck. I referred to this post as well, but no luck. As per this post, we need to update the daemon.json file present in the docker config folder with the primary and secondary DNS addresses of our system.

In Linux systems, this daemon.json file is present at /etc/docker/config/ path and in windows, it is present at %programdata%/docker/config/ location. Since I am using windows, I used the later location file to update this info and then restarted my docker and repeated the steps by creating the new image. But no luck at all.

Note: IP addresses have been changed just for posting here. I also tried the same steps for an image for Ubuntu 16.04 but still same issue is coming.

halfer
  • 19,824
  • 17
  • 99
  • 186
CodeHunter
  • 2,017
  • 2
  • 21
  • 47
  • Are you able to ping the ip which belongt to archive.ubuntu.com? How does/etc/resolve.conf look like? Can you ping the dns server listed there? – Murmel Jan 30 '18 at 22:20
  • yes. I am able to ping it and getting response as well without any issues. – CodeHunter Jan 30 '18 at 22:21
  • but when I am trying to ping the ip address coming in the error message, i am not able to ping it successfully. Let me try changing that instead and see what happens. – CodeHunter Jan 30 '18 at 22:48

1 Answers1

1

You Should Upgrade your distribution 14 to 16. Because Ubuntu 14 is longer supported for updates.

Kashif Saleem
  • 132
  • 2
  • 12