Skip to content

docker compose pull has no options for pull policy #10977

@dhorkin

Description

@dhorkin

Description

I was having issues with my docker compose project when I tried to run it from within a Github Action. Seems like for some reason, on Github, I get rate limited for pulls, but don't locally.

This led to me coming up with the workaround of running docker compose --parallel 1 pull before the docker compose up

I noticed that even though the docker cache github action was showing corresponding cached images, the docker compose --parallel 1 pull was resulting in images being pulled even though they were already in the cache (I was still getting occasional rate limit pull failures on cached images)

In other words, there's no way to say docker compose pull --missing-only the way you can do docker compose up --pull missing

This led to me attempting the following even hackier workaround:

docker compose --parallel 1 up --pull missing --no-start
# the above line breaks docker compose up; I guess it's expecting docker compose start, but I need to use my makefile task
docker compose rm --force --volumes
# the following line, among other things, runs docker compose up
make setup

I'm not happy with this solution, but COMPOSE_PARALLEL_LIMIT=1 make setup would cause performance issues. Doing docker compose --parallel 1 pull --ignore-pull-failures also is not an ideal solution, since it will attempt unnecessary pulls.

TL;DR

there should be some sort of flag for docker compose pull that corresponds to docker compose up --pull ____ so that you can pull only missing images

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions