Canary a new image on a Swarm service.
AdvancedScenarioCI/CD and production rollouts
Answer
Situation read → Gradual rollout.
What I'd do →
docker service update --image reg/app:1.9.0 \
--update-parallelism 1 --update-delay 30s \
--update-failure-action rollback --update-monitor 60s app
docker service rollback app
Why → Rolls task by task and rolls back automatically on failed health.
Interview tip → For weighted traffic splitting you need a service mesh or Traefik weighted services.
More on CI/CD and production rollouts
Design a GitHub Actions workflow that builds, scans and pushes an image.IntermediateZero-downtime deploy on a single Docker host.AdvancedDeploy via GitOps with image digests.IntermediateDocker build is flaky in CI due to network errors on package installs.IntermediateRun database migrations in the deploy flow of containerized apps.IntermediateHow do you keep dev, CI and prod consistent?Beginner