Skip to content
This repository has been archived by the owner on Nov 15, 2017. It is now read-only.

Docker builds intermittently failing due to apt cache issues #162

Open
namliz opened this issue Nov 17, 2016 · 0 comments
Open

Docker builds intermittently failing due to apt cache issues #162

namliz opened this issue Nov 17, 2016 · 0 comments

Comments

@namliz
Copy link
Contributor

namliz commented Nov 17, 2016

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.

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant