Skip to content

Add weekly Docker image refresh workflow for security updates#4330

Merged
tillrohrmann merged 1 commit intorestatedev:mainfrom
tillrohrmann:issues/4329
Feb 6, 2026
Merged

Add weekly Docker image refresh workflow for security updates#4330
tillrohrmann merged 1 commit intorestatedev:mainfrom
tillrohrmann:issues/4329

Conversation

@tillrohrmann
Copy link
Contributor

Implement automatic refresh of Docker images to include latest base image security updates without rebuilding binaries:

  • Add docker/Dockerfile.refresh for lightweight image rebuilds
  • Add .github/workflows/docker-refresh.yml scheduled weekly workflow
  • Add OCI labels (base.name, base.digest) for change detection
  • Add date-suffixed tags (e.g., 1.6.0-20260204) for all builds
  • Add automatic 'latest' tag detection (only for newest semver release)
  • Skip refresh if base image unchanged or source image doesn't exist

The refresh workflow:

  • Runs weekly on main and release-* branches
  • Extracts version from Cargo.toml to find latest patch release
  • Compares base image digests to detect changes
  • Pushes to both GHCR and DockerHub

Closes #4329

@pcholakov
Copy link
Contributor

Thanks so much for jumping on this, @tillrohrmann! I like the date-based suffixed tags; this will work well for Cloud.

To go with this, it might be useful to also have a weekly security-focused cargo update automatic PR created against the latest release branch. E.g., I believe we currently ship a vendored OpenSSL librdkafka dependency which won't get picked up or updated by this workflow.

Long term, it might be super useful to publish an SBOM for Restate images to aid deployment-time scanning. Apparently https://github.com/rust-secure-code/cargo-auditable can bake dependency metadata directly into ELF binaries.

@jackkleeman
Copy link
Contributor

#4331 added a new file and dir in the images (a symlnk) which we need to also carry over

@tillrohrmann
Copy link
Contributor Author

Thanks so much for jumping on this, @tillrohrmann! I like the date-based suffixed tags; this will work well for Cloud.

To go with this, it might be useful to also have a weekly security-focused cargo update automatic PR created against the latest release branch. E.g., I believe we currently ship a vendored OpenSSL librdkafka dependency which won't get picked up or updated by this workflow.

Long term, it might be super useful to publish an SBOM for Restate images to aid deployment-time scanning. Apparently https://github.com/rust-secure-code/cargo-auditable can bake dependency metadata directly into ELF binaries.

These sound like really great ideas for follow-up issues. I will open corresponding issues for tracking them.

#4331 added a new file and dir in the images (a symlnk) which we need to also carry over

Thanks for the pointer @jackkleeman. Updating Dockerfile.refresh accordingly.

@tillrohrmann
Copy link
Contributor Author

@jackkleeman I've addressed all open comments. It's ready for another review.

@tillrohrmann
Copy link
Contributor Author

One related question: Should we change the default image pull policy of the helm charts to always so that people get the security updates on rollouts, crashes, etc.? If yes, then we should probably also update the defaults of the operator.

@jackkleeman
Copy link
Contributor

One related question: Should we change the default image pull policy of the helm charts to always so that people get the security updates on rollouts, crashes, etc.? If yes, then we should probably also update the defaults of the operator.

probably not ideal as if the registry is down then your pod wont start

Copy link
Contributor

@jackkleeman jackkleeman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i worry slightly that the latest tag logic may not work for other repos that use docker.yml. but we shall soon see!

@tillrohrmann
Copy link
Contributor Author

i worry slightly that the latest tag logic may not work for other repos that use docker.yml. but we shall soon see!

Fair point. Let's see.

Implement automatic refresh of Docker images to include latest base image
security updates without rebuilding binaries:

- Add docker/Dockerfile.refresh for lightweight image rebuilds
- Add .github/workflows/docker-refresh.yml scheduled weekly workflow
- Add OCI labels (base.name, base.digest) for change detection
- Add date-suffixed tags (e.g., 1.6.0-20260204) for all builds
- Add automatic 'latest' tag detection (only for newest semver release)
- Skip refresh if base image unchanged or source image doesn't exist

The refresh workflow:
- Runs weekly on main and release-* branches
- Extracts version from Cargo.toml to find latest patch release
- Compares base image digests to detect changes
- Pushes to both GHCR and DockerHub

Closes restatedev#4329
@tillrohrmann tillrohrmann merged commit 797da3f into restatedev:main Feb 6, 2026
6 checks passed
@tillrohrmann tillrohrmann deleted the issues/4329 branch February 6, 2026 18:58
@github-actions github-actions bot locked and limited conversation to collaborators Feb 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Restate container images regularly to include latest security fixes

3 participants