Rolling update not working with docker compose

I’m trying to get rolling updates working with docker compose (without swarm) and it’s not working.

Example:

services:
  test:
    image: ubuntu:22.04
    command: sleep 60
    deploy:
      replicas: 2
      update_config:
        parallelism: 1
        delay: 30s
        order: start-first
        failure_action: rollback
        monitor: 60s

IIUC this should start a new replica upon docker compose up to replace one of the replicas, and then repeat that process.

But what actually happens is that both containers are simply stopped at the same time, no additional replica is created, and there is not rolling update.

Thanks!

Rolling updates only work with Docker Swarm, as just discussed here.

Thank you! It’s hard to find up-to-date information on what’s supported by docker compose and what isn’t.