Docker caches aggressively so a common first line in your Dockerfile like apt update will not run each time and eventually the mirror list will become stale and builds will fail.
Possible workaround #1
docker build --no-cache
Possible workaround #2
RUN apt-get clean && apt update
While the above helps with stale mirrors it does not help with unresponsive/slow/broken ones.
FROM debian:stable
RUN apt-get clean && apt update && apt install -y
RUN apt install -y kernel-package
This is taking a very long time today but eventually completes despite appearing to be frozen. Building large containers (this one ends up being 1GB in size, ouch) from a laptop is not a good workflow.
This is a pretty well known problem.
Docker caches aggressively so a common first line in your Dockerfile like
apt update
will not run each time and eventually the mirror list will become stale and builds will fail.Possible workaround #1
docker build
--no-cache
Possible workaround #2
RUN apt-get clean && apt update
While the above helps with stale mirrors it does not help with unresponsive/slow/broken ones.
This is taking a very long time today but eventually completes despite appearing to be frozen. Building large containers (this one ends up being 1GB in size, ouch) from a laptop is not a good workflow.