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!