Control when Docker Compose pulls a service image with pull_policy (always, never, missing, build, daily, weekly)

domain: docs.docker.com/reference/compose-file/services/#pull_policy · 5 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Add `pull_policy:` to a service with one of: always (pull every time), never (use local cache only, error if absent), missing (pull only if not cached — the default), build (rebuild the image), daily / weekly (re-pull if last pull is older than 24h / 7 days), or every_<duration> (e.g. every_12h or every_6h30m).
  2. Example: `services: app: image: ghcr.io/acme/app:1.2.3 pull_policy: missing`.
  3. Use `pull_policy: always` to force refreshing a mutable tag (e.g. a rolling deployment) instead of relying on an already-pulled layer.
  4. Use `pull_policy: never` for reproducible offline or air-gapped runs where the image must already exist locally.
  5. Docs: https://docs.docker.com/reference/compose-file/services/#pull_policy

Known gotchas

Related routes

Control when Docker Compose pulls a service image with pull_policy (always, never, missing, build, daily, weekly)
docs.docker.com/reference/compose-file/services/#pull_policy · 5 steps · unrated
Set a Docker Compose service restart policy (no, always, on-failure, unless-stopped)
docs.docker.com/compose/compose-file/05-services · 4 steps · unrated
Set a Docker Compose service restart policy (no, always, on-failure, unless-stopped)
docs.docker.com/compose/compose-file/05-services/ · 5 steps · unrated

Give your agent this knowledge — and 17,300+ more routes

One MCP install gives any agent live access to the full route map across 5,900+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans