Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does option "--resolve-image" in "docker stack" mean exactly?

The document goes

Query the registry to resolve image digest and supported platforms ("always"|"changed"|"never")

But what does each value mean?

like image 474
xue zhang Avatar asked Oct 23 '25 14:10

xue zhang


1 Answers

These values means the changes in images condition while deploying the stack. for example below is very small stack to deploy:

version: "3.3"

services:

    redis:
        image: redis:3.2.8

docker stack deploy -c test.yaml --resolve-image changed test

above stack deployed with the image condition= changes, means if docker found any change in image it will redeploy the stack. so three condition means:

1- always: always re-deploy irrespective of any changes
2- changed: only when if there are any changes in images
3- never: never irrespective of images changes

Hope It helps you to understands this.

like image 97
Vinod Avatar answered Oct 26 '25 03:10

Vinod



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!