feat: Use a rootless hardened docker image#136
Merged
timokoessler merged 4 commits intomainfrom May 1, 2026
Merged
Conversation
+ Also sign docker images
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Hub/Agent container images to use hardened distroless bases (including running Hub rootless), adds startup checks to ensure the Hub data directory is writable under rootless execution, and extends the release workflow to verify/sign images with cosign.
Changes:
- Switch Hub and Agent runtime images from Alpine to distroless (Hub uses
:nonroot). - Add Hub startup initialization to create/check writability of the
datadirectory, with new unit tests. - Add cosign install + base image signature verification + image signing to the release workflow.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
hub.Dockerfile |
Moves Hub runtime to distroless nonroot base and adjusts copies to set ownership. |
agent.Dockerfile |
Moves Agent runtime to distroless base (root) with rationale comments. |
backend/internal/hub/server.go |
Calls initDataDir() during Hub startup before DB connect. |
backend/internal/hub/data_dir.go |
Implements data directory creation + writability checks with user-facing error guidance. |
backend/internal/hub/data_dir_test.go |
Adds tests for writable and non-existent directories. |
backend/internal/hub/data_dir_unix_test.go |
Adds a Unix-only test for read-only directory handling. |
.github/workflows/release.yml |
Adds cosign verification of base images and signs published images; introduces matrix base image refs. |
.dockerignore |
Ignores *.exe artifacts in Docker build context. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
alex289
approved these changes
May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of change
Description
Additional context
There is no alpine variant available and this debian based distroless images are not really larger. DHI images by Docker itself required authentication to be pulled and are not really open source.