-
Notifications
You must be signed in to change notification settings - Fork 1
feat: multi-arch Docker images built with Nix #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Replace Dockerfile with Nix-based image builds using dockerTools.buildLayeredImage and pkgsCross for cross-compilation. Images are pushed by digest via skopeo and assembled into multi-arch manifests with docker buildx imagetools.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR migrates Docker image builds from a traditional Dockerfile to a pure Nix-based approach using dockerTools.buildLayeredImage, enabling native multi-architecture support for both linux/amd64 and linux/arm64.
Changes:
- Replaced
Dockerfileand.dockerignorewith Nix-based image definitions (docker.nix,docker-base-amd64.nix,docker-base-aarch64.nix) - Updated CI workflows to build and test both architectures using a matrix strategy, with digest-based pushing and multi-arch manifest creation
- Added development tooling (
nix-prefetch-docker,skopeo) and a justfile recipe to update base images
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| justfile | Adds recipe to fetch and update base image metadata for both architectures |
| flake.nix | Defines multi-arch image packages using pkgsCross and adds required dev tools |
| docker.nix | Implements Nix-based Docker image builder with architecture-specific base image selection |
| docker-base-amd64.nix | Defines metadata for the amd64 base image |
| docker-base-aarch64.nix | Defines metadata for the aarch64 base image |
| Dockerfile | Removed traditional Dockerfile in favor of Nix approach |
| .dockerignore | Removed as it's no longer needed with Nix builds |
| .github/workflows/test_image.yaml | Updated to build and test both architectures in a matrix with Nix |
| .github/workflows/publish.yaml | Refactored to build arch-specific images, push by digest, and create multi-arch manifests |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3393fcd to
c6a46cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cca88dc to
c6a46cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 9 out of 10 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 13 out of 14 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
04d4e38 to
a2d05ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 14 out of 15 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 14 out of 15 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 14 out of 15 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Dockerfileand.dockerignorewith pure Nix image builds (dockerTools.buildLayeredImage+pkgsCross)linux/amd64andlinux/arm64images vianix buildskopeo) and assembles multi-arch manifests withdocker buildx imagetools createskopeoto dev shell and usenix develop --command bash {0}as default shell in CI jobsTest plan
Test Image Buildworkflow passes for both matrix entries (amd64 + arm64)nix build .#sysdig-mcp-server-image-amd64produces a loadable image locallynix build .#sysdig-mcp-server-image-aarch64completes successfully