Interview Prep/Docker/Multi-stage builds, cache, tags and registries

Pull rate limits from Docker Hub are failing CI. What are your options?

IntermediateScenarioMulti-stage builds, cache, tags and registries
Answer

Situation read → Anonymous pulls are rate limited per IP; shared NAT in CI exhausts it.

What I'd do →

  1. Authenticate pulls with a Docker Hub service account (docker login).
  2. Set up a pull-through cache (Harbor proxy project, ECR pull-through cache, registry:2 with proxy.remoteurl).
  3. Mirror critical base images into our own registry and reference those.
  4. Configure registry-mirrors in daemon.json.

Why → Reduces external dependency and speeds up pulls.

Interview tip → Mirroring base images also protects you from upstream tag removal.

All Docker questions Roadmap: Docker & containers

More on Multi-stage builds, cache, tags and registries