Docker Community Forums

Share and learn in the Docker community.

Is it possible to skip pull in `docker-compose up`?


is it possible to skip pull in docker-compose up command and fail if there is no images locally.
Currently it prints the prompt:

ERROR: The image for the service you're trying to recreate has been removed. If you continue, volume data could be lost. Consider backing up your data before continuing.

Continue with the new image? [yN]y

Did you try to add the option -ignore-pull-failures?

Yes, there is no such option for up command

I assumed you also tried --prefer-local?

If I where you, I would immediatly re-tag the image from the local image cache and push it into a private repository… and use the image from there.

That is the case:
I have images tagged locally. And all works fine.
The issue here is that if for some reason local image is missing I want command compose up to fail not to ask user if he wants to pull etc as it is confusing

I am not aware of such options. docker-compose has a quite limited set of options…

ok i thing so slot my friend :DD

so current hacky workaround is

yes N | docker-compose up ...