# Add Renovate to Keep Docker Compose Image Tags Current

Yes. An agent reads every image tag in your Compose files, writes a Renovate config that groups and schedules the bumps, dry-runs it in its sandbox and opens a PR.

[Run this on Rush](https://cloud.getrush.ai/run/add-renovate/docker-compose/). Opens the console with this prompt ready to send, in a Project that has your repository.

## What the agent does

The agent clones the repository into its own cloud sandbox and inventories what Renovate would see. In a repository like docker/awesome-compose there are 39 Compose files, one per sample directory, plus the Dockerfiles behind the services they build. The `image:` lines are a mix Renovate handles differently: pinned tags such as `mariadb:10.6.4-focal`, `mongo:4.2.0`, `traefik:2.6` and `elasticsearch:7.16.1`; floating majors like `mariadb:10-focal` and `postgres:12-alpine`; `latest` tags on `wordpress`, `gitea/gitea`, `pihole/pihole` and `dpage/pgadmin4`; and bare names with no tag at all, `nginx`, `postgres`, `mongo`, `prom/prometheus` and `grafana/grafana`, which carry no version for Renovate to bump. The Dockerfiles add `FROM` lines such as `nginx:1.13-alpine`, `golang:1.18-alpine`, `rust:1.64`, `python:3.10-alpine` and `maven:3.8.5-eclipse-temurin-17`. There is a `.github/workflows/codeql-analysis.yml` with actions pinned to commit SHAs and version comments, no `renovate.json` and no `dependabot.yml`, and `CONTRIBUTING.md` requires a Developer Certificate of Origin sign-off on every commit.

It writes `renovate.json` extending `config:recommended`, enabling the `docker-compose`, `dockerfile` and `github-actions` managers, and sets `schedule` to a weekly window, `minimumReleaseAge` of a few days so a tag that is yanked the day it ships never reaches a pull request, and `dependencyDashboard: true`. Because a repository of samples should not get one pull request per image, `packageRules` group updates by directory, so the `nginx-golang-postgres` sample's `postgres` and `nginx` bumps arrive together, and a rule disables `major` updates for database images (`mariadb`, `mongo`, `postgres`, `elasticsearch`) where a major jump means a data migration a sample should not make silently. The sign-off requirement is met with `commitBody` carrying a `Signed-off-by` trailer so Renovate's own commits pass the DCO check. The SHA-pinned actions keep their pins: `helpers:pinGitHubActionDigests` makes Renovate update the SHA and the version comment together.

Bare image names and `latest` tags are a decision, not a config line, so the agent lists them in the pull request rather than editing the samples: Renovate skips them, and pinning `image: postgres` to a major tag is the maintainers' call. The dry run makes this concrete: the agent runs `renovate --platform=local --dry-run` with `LOG_LEVEL=debug` in the sandbox, which needs no token, and reads the extracted dependency list and the updates it would propose on the first run.

It validates the file with `renovate-config-validator`, checks that no sample directory was missed by comparing the extracted dependencies against its own `grep` of `image:` and `FROM` lines, and opens the pull request with the dry-run summary: how many images are tracked, how many would get an update now, and which are untrackable and why.

## Start it with one API call

`POST https://api.phoenix.so/o/{org}/sessions`

```json
{
  "agent": "claude",
  "input": "Add Renovate to this repository so Docker Compose image tags and Dockerfile base images stay current. Inventory every image: line in the Compose files and every FROM line in the Dockerfiles first, and sort them into pinned tags, floating majors, latest tags and untagged names. Write a renovate.json extending config:recommended with the docker-compose, dockerfile and github-actions managers, a weekly schedule, a minimum release age, the dependency dashboard, package rules that group updates by sample directory and disable major updates for database images, pinned action digests kept in sync with their version comments, and a Signed-off-by trailer in commit bodies because CONTRIBUTING.md requires DCO. Validate the config with renovate-config-validator, run renovate with the local platform in dry-run mode to list what it would update, and open a pull request whose description includes that summary and the list of untagged or latest images Renovate cannot track. Do not edit the Compose files.",
  "resources": [
    {
      "url": "https://github.com/your-org/your-app"
    }
  ]
}
```

1. **Get an API key.** In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
2. **Send the request.** POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
3. **Read what came back.** Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

## What comes back

What comes back is a pull request that adds one file, `renovate.json`, and changes nothing else. Its description has three lists from the sandbox dry run: the images Renovate now tracks with the update it would open first, the images grouped per sample so a reviewer can see what one weekly pull request will contain, and the untagged or `latest` images it cannot track, each with the Compose file it lives in.

The run's record keeps the validator output and the full dry-run log, so a reviewer can check that the `docker-compose` manager found every `compose.yaml` and `compose.yml`, including the samples that use the older filename, without installing Renovate themselves.

Before merging, a reviewer installs the Renovate GitHub App on the repository if it is not already there, since the config only takes effect once the app runs, and decides what to do with the untagged images: leave them floating, or pin them to a major tag in a follow-up so Renovate can watch them too.

## Run it on every Renovate pull request

Once Renovate is on, the recurring work moves to its pull requests. A `github` trigger never fires for a pull request a bot opens, so Renovate's pull requests cannot start an automation in the console; a handler on your server starts one run per Renovate pull request instead, with that pull request's branch checked out. For a Renovate pull request the run installs Docker in its sandbox (`sudo apt-get install -y docker.io`, then starts `dockerd`), runs `docker-compose config` and `docker-compose up` for the sample directory the bump touches, waits for the health checks the Compose file declares, and posts what it saw as a review comment.

The handler receives GitHub's `pull_request` webhook, checks that the author is Renovate, and sends one `POST /o/{org}/sessions` per Renovate pull request, naming the pull request URL in `resources` so the run checks out that branch, with a `request_id` that is a UUID v5 of the pull request id so a redelivery never starts a second run.

## Why run it on Rush?

A Renovate config written blind is a gamble on how many pull requests appear the following Monday. The dry run in the sandbox replaces the gamble with a list: the agent can install Renovate, run it against the local checkout with no token, and read what it would do, which is not something most people set up on a laptop for a one-off config change. The resulting config is tuned to the actual tags in the repository rather than to a generic template.

Running it on Rush also keeps the evidence: the validator output, the dry-run log and the inventory of untrackable images sit in the run's record next to the pull request, so the decision about `latest` tags is made once, with the data, instead of being rediscovered when the first unexpected pull request lands.

## Frequently asked questions

### Will Renovate change the untagged images like image: postgres?

No. An image with no tag has no version to update, so Renovate ignores it, and the agent does not pin it for you because that changes the sample's behaviour. The pull request lists each one with its file; pinning them to a major tag is a separate, deliberate change.

### Does it update the Dockerfiles too?

Yes. The `dockerfile` manager reads every `FROM` line, so `golang:1.18-alpine`, `rust:1.64` and `nginx:1.13-alpine` are tracked alongside the Compose images, and the per-directory grouping puts a sample's Dockerfile bump in the same pull request as its Compose bump.

### How does it satisfy the DCO sign-off rule?

With `commitBody` set to a `Signed-off-by` trailer in `renovate.json`, so every commit Renovate makes carries the line the repository's contributing guide requires and the DCO check passes without a maintainer amending the commit.

### Why not Dependabot?

Either works for image tags. Renovate is chosen here for `packageRules`: grouping by directory, disabling majors for databases only, a release age floor and a dependency dashboard are all one config file, which is what keeps a 39-sample repository from receiving dozens of separate pull requests.

### Will the first run open a flood of pull requests?

The dry run shows exactly how many updates are pending before anything merges, and the config sets `prConcurrentLimit` so Renovate opens a handful at a time. The dependency dashboard issue lists the rest, and a reviewer can tick them in as capacity allows.

## More Docker Compose jobs

- [Add Resource Limits to a Docker Compose Stack](https://getrush.ai/run/add-resource-limits/docker-compose/)
- [Add Restart Policies to Docker Compose Services](https://getrush.ai/run/add-restart-policies/docker-compose/)
- [Add a Reverse Proxy to a Docker Compose Stack](https://getrush.ai/run/add-reverse-proxy/docker-compose/)

## The same job on other stacks

- [Add Renovate to a Gradle and Maven Project](https://getrush.ai/run/add-renovate/gradle/)
- [Set Up Renovate for a Temporal TypeScript Monorepo](https://getrush.ai/run/add-renovate/temporal/)
- [Add Renovate to a Terraform Module Repository](https://getrush.ai/run/add-renovate/terraform/)

## Keep reading

- [How a Rush run works on your repository, from request to pull request](https://getrush.ai/cloud/)
- [Compare cloud agents, agent sandboxes and AI code review](https://getrush.ai/compare/)
- [Rush pricing: Free, Pro and Max](https://getrush.ai/pricing/)
