You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Docker compose up/pull does not pull images referenced in pre_start lifecycle hooks #13924
Images referenced by a pre_start lifecycle hook are never pulled by docker compose up or docker compose pull. Only top-level service image: refs are resolved. If the hook image isn't already present locally, the hook fails at runtime with No such image, and the user must docker pull it manually. The hook image is parsed into the config (it appears in docker compose config --format json), it's just excluded from the pull set (docker compose config --images omits it).
up/pull pull the hook image (respecting pull_policy), the same as service
images.
Actual
Error response from daemon: No such image: alpine:3.19
docker compose config --images and docker compose pull both omit the hook
image; it is only fetched if pulled manually.
Because the hook image is already present in the normalized config, including it in the common image traversal seems likely to keep config --images, pull, and up consistent. A regression matrix should also cover duplicate service/hook references and hook-level pull_policy, so the fix neither pulls twice nor bypasses an explicit policy. If post-start hooks can declare images through the same schema, covering those in the traversal would prevent the behavior from remaining asymmetric.
Activity
hiSandog commentedon Jul 15, 2026
Because the hook image is already present in the normalized config, including it in the common image traversal seems likely to keep
config --images,pull, andupconsistent. A regression matrix should also cover duplicate service/hook references and hook-levelpull_policy, so the fix neither pulls twice nor bypasses an explicit policy. If post-start hooks can declare images through the same schema, covering those in the traversal would prevent the behavior from remaining asymmetric.