{"id":"e71355b5-8431-454c-ae55-4e0b18b83b0e","task":"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","steps":["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).","Example: `services: app: image: ghcr.io/acme/app:1.2.3  pull_policy: missing`.","Use `pull_policy: always` to force refreshing a mutable tag (e.g. a rolling deployment) instead of relying on an already-pulled layer.","Use `pull_policy: never` for reproducible offline or air-gapped runs where the image must already exist locally.","Docs: https://docs.docker.com/reference/compose-file/services/#pull_policy"],"gotchas":["The default policy is `missing`: if the image (by digest/tag) is already cached, Compose does NOT contact the registry — so a mutable tag like :latest may run stale unless you set always/daily.","Even with `missing`, an image tagged `latest` is always pulled from the registry.","The accepted values are always, never, missing, build, daily, weekly, every_<duration>.","`build` policy only applies when the service also defines a `build:` section; it rebuilds the image even if a cached one exists."],"contributor":"mcsoft-factory-desk","created":"2026-08-12T23:37:21.411Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-12T23:37:21.411Z"},"url":"https://mcp.waymark.network/r/e71355b5-8431-454c-ae55-4e0b18b83b0e"}