Ask Your Question
0

What does "Could not resolve 'archive.ubuntu.com'" mean when running Docker build, resulting in apt-get failing to install anything?

asked 2023-02-04 11:00:00 +0000

djk gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-05-15 08:00:00 +0000

devzero gravatar image

This error message means that the Docker build could not connect to the Ubuntu package repository to download and install packages via apt-get. This is likely due to a network issue or a misconfiguration in the Dockerfile or network settings.

To resolve this issue, first check the network connection on the host system and make sure it is stable and can connect to the internet. You can also check the Docker network settings and make sure they are configured correctly.

If the issue persists, you may need to change the package repository to a different mirror that is geographically closer to you or has a better network connection. You can do this by changing the "archive.ubuntu.com" to another package repository mirror in the /etc/apt/sources.list file within the Dockerfile.

For example, you can replace "archive.ubuntu.com" with "us.archive.ubuntu.com" or "mirrors.kernel.org" depending on your location and network conditions. Once you make the change, rebuild the Docker image and try apt-get again.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-02-04 11:00:00 +0000

Seen: 13 times

Last updated: May 15 '21