How to ROLLING update to latest image with rancher-compose?

I want to do a rolling upgrade for a service, updating its image to a new one, using rancher compose.

I have tried a number of things that do not work

What am i missing?

Have you seen the docs on upgrades?

http://docs.rancher.com/rancher/rancher-compose/upgrading/

  1. If you want to update the image, you should use the label io.rancher.container.pull_image: always so that whenever you launch a new container, it will always pull the new image.

Alternatively, you can add the option --pull to update the image on the hosts when doing the rancher-compose up --upgrade.

It also sounds like you’d want to do teh equivalent of an in-service upgrade, but have the new containers start before hte old containers are stopped.

http://docs.rancher.com/rancher/rancher-compose/upgrading/#starting-new-containers-before-stopping-old-containers

1 Like