Docker Rollout: Zero-Downtime Deployments for Docker Compose Made Simple

Have you worked with Docker compose and ever wanted to have a proper blue/green deployment for making sure your services stay up and running when you update them? We have all experienced going down for a few seconds or a full restart of containers when updating them. Docker Compose is a great solution for orchestrating multiple container setup. However, it is lacking in native support for zero-downtime deployments. That is where a solution called Docker Rollout comes into play.
What is Docker Rollout?
This is an open-source solution developed by a developer named wowu. It is a solution that brings zero-downtime deployments to Docker compose environments by smartly controlling container restarts. Let’s take a look at more of the details of the solution, why you might want to try it out and how to use it.
Where might it be used?
- Home lab servers with live uptime requirements
- Lightweight production apps running on VPS or bare metal
- CI/CD pipelines needing safe deploys without Kubernetes
- Reverse-proxy-backed service upgrades
What is Zero-downtime and why do you need it?
When you are running production microservices or “mission-critical” home lab workloads, uptime is a great thing to have. Natively, docker Compose doesn’t have support for advanced deployments like rolling updates, blue-green deployments, or canary releases.
When you run docker-compose up -d, containers get stopped and replaced. Even if this is only for a moment, during the replacement, your application is offline. And, for larger containers or applications like GitLab that may take a while to successfully start back up, this can definitely be noticeable.
Docker Rollout provides a solution that offers minimal disruption for your apps. Especially when you combine it with a reverse proxy like Nginx or Traefik, it allows you to gracefully handle traffic while services are being updated.
What Is Docker Rollout?
Docker Rollout is a command-line utility designed to replace docker-compose up -d. So instead of using the traditional docker-compose up -d command, you will use the docker-rollout command as we will show below. It works by:
- Detecting running services defined in your Compose file
- Starting new containers with the updated image and settings
- Waiting until the new container is healthy and ready
- Redirecting traffic to the new container
- Stopping the old container(s)
The result? Seamless container upgrades with zero-downtime for your deployment. You can check out the project here:
How Docker Rollout Works
Docker Rollout does something simple that Docker-Compose doesn’t do. It waits. It waits for your container to pass its health check, then safely switches over to the new container. It doesnโt nuke-and-replace like Composeโs default behavior. Instead, it copies what Kubernetes does with rolling updates. However, it does this though on a simpler, more accessible level for Compose users.
Here’s a simplified version of the logic:
- Pull the latest image for the service
- Start a new container with a different name (suffixed with
-rollout-temp
) - Wait for the health check to pass
- Remove the old container
- Rename the new container back to the original name
This process ensures no gaps in service as long as your health checks and reverse proxy are properly configured.
Install Docker Rollout
Docker Rollout is a Go-based CLI and can be installed easily. For Linux/macOS systems, you just run the following CURL command to pull down the install.sh script:
# Create directory for Docker cli plugins
mkdir -p ~/.docker/cli-plugins
# Download docker-rollout script to Docker cli plugins directory
curl https://raw.githubusercontent.com/wowu/docker-rollout/main/docker-rollout -o ~/.docker/cli-plugins/docker-rollout
# Make the script executable
chmod +x ~/.docker/cli-plugins/docker-rollout
Or you can install it manually by downloading the binary from the releases page.
Using it
Let’s look at an app that you may have setup in Docker Compose like this:
version: '3.8'
services:
web:
image: myapp:latest
ports:
- "80:80"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
interval: 30s
timeout: 10s
retries: 5
Normally, youโd run:
docker-compose up -d --build
Instead, with Docker Rollout:
docker-rollout up
This command builds the image (if necessary) and starts a new container for the web
. It then waits for it to pass its health check, and then removes the old one.
Behind the Scenes
Docker Rollout doesn’t depend on Compose directly. It uses Dockerโs API to:
- Inspect existing containers
- Launch new ones
- Watch health checks
- Clean up old containers
That means you donโt need docker-compose installed to use Docker Rollout, and you can even integrate it into CI/CD pipelines for automated, zero-downtime rollouts. Pretty cool!
Deployment flow example
Hereโs what a full workflow might look like in a production or staging deployment:
- Build your image: docker build -t myapp:latest .
- Push your image (if using a registry):
- Deploy using Docker Rollout: docker-rollout up
For extra reliability, combine Docker Rollout with:
- An Nginx or Traefik reverse proxy
- Sticky sessions if needed
- Container health checks
Docker Compose vs Docker Rollout
Feature | docker-compose up -d | docker-rollout up |
---|---|---|
Rolling updates | No | Yes |
Zero downtime | No | Yes |
Health check integration | Limited | Yes |
Waits for readiness | No | Yes |
Requires Compose installed | Yes | No (just Docker daemon) |
Are there any limitations?
Docker Rollout is really great, but is not fool-proof or exactly magic. Here are a few caveats:
- Only supports one container per service at a time – itโs not built for high-scale multi-replica deployments like Kubernetes is built for
- Depends on accurate health checks – no health check will lead to no protection against failed rollouts.
- May conflict with strict networking setups – if you’re using container names for service discovery, be cautious.
Wrapping up
Docker Rollout is one of the coolest little utilities you will find for Docker Compose and for those that want to have control over their Docker deployments in a way that resembles Kubernetes. It helps to bridge the gap between simplicity and reliability. It will help you have that experience that is closer to Kubernetes or Swarm without the complexity that those solutions bring with them. Let me know in the comments if you have used this before?