Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6129

Cannot run apt-get update in docker

$
0
0

I am having issues connecting with apt-get from a Docker image. To recreate, I can run

sudo docker run -it ubuntu /bin/bash

and then type:

apt-get update

Without fail, the machine is unable to connect and I get a series of errors that look like this:

Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/focal/InRelease Could not connect to ports.ubuntu.com:80 (91.189.88.152), connection timed out

I am running an M1 Macbook Pro and have tried:

  • Changing DNS settings
  • Other docker base images
  • I'm able to successfully download from other sources (eg. pip install)
  • Disabling IPv6
  • Trying another wi-fi network (I'm not behind any firewalls)

None of this has helped so far, and I have been completely unable to apt-get update or apt-get install to work in a docker container. Would greatly appreciate the help!


Viewing all articles
Browse latest Browse all 6129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>