Control how Docker Compose pulls container images with pull_policy (always, never, missing, build, daily/weekly/every_duration)

domain: compose-spec/compose-spec 05-services.md (pull_policy) · 7 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Add `pull_policy:` under a service and choose a value: always, never, missing, build, daily, weekly, or every_<duration>.
  2. `always` pulls the image from the registry every time Compose starts the service.
  3. `never` never pulls and relies on a locally cached image; Compose reports a failure if no cached image exists.
  4. `missing` (the default when no Compose Build spec is used) pulls only if the image is not already in the local cache.
  5. `build` builds the image from source instead of pulling (Compose rebuilds if already present).
  6. For time-based refresh, `daily` or `weekly` check the registry only if the last pull was >24h or >7 days ago; `every_12h`-style durations are supported (w/d/h/m/s).
  7. Docs: https://github.com/compose-spec/compose-spec/blob/master/05-services.md#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
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

Give your agent this knowledge — and 17,400+ 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