feat: switch to multi-agent image (1/) - #1335
Open
Chen Yu (michaelawyu) wants to merge 2 commits into
Open
Conversation
Signed-off-by: michaelawyu <chenyu1@microsoft.com>
Contributor
Author
|
Note: CRD installers are omitted for now as extra setup is required. Arc Helm chart is also omitted for now. They will be added back as necessary checks are completed. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a build + publish pipeline for a new “multi-agent” container image that bundles Fleet + Fleet Networking agent binaries and publishes multi-arch images (amd64/arm64) to ACR/MCR via GitHub Actions.
Changes:
- Add
docker/multi-agent.Dockerfileto build Fleet + Fleet Networking agent binaries into a single Azure Linux distroless image. - Add helper Makefile +
.dockerignoreto drive multi-arch builds via Docker Buildx from a combined workspace. - Add a GitHub Actions workflow to build/push arch-specific images and then create a multi-arch manifest tag.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docker/multi-agent.Dockerfile | Multi-stage build for Fleet + Fleet Networking binaries, packaged into a single distroless image. |
| .github/workflows/build-publish-multi-agent-mcr.yml | CI workflow to build/publish amd64 + arm64 images and create a multi-arch manifest. |
| .github/helpers/multi-agent/Makefile | Build orchestration using Docker Buildx with architecture detection and builder setup. |
| .github/helpers/multi-agent/.dockerignore | Reduces Docker build context noise by excluding binaries and git metadata. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+13
to
+26
| # Auto-detect system architecture if it is allowed and the necessary commands are available on the system. | ||
| ifeq ($(AUTO_DETECT_ARCH), TRUE) | ||
| ARCH_CMD_INSTALLED := $(shell command -v arch 2>/dev/null) | ||
| ifdef ARCH_CMD_INSTALLED | ||
| TARGET_ARCH := $(shell arch) | ||
| # The arch command may return arch strings that are aliases of expected TARGET_ARCH values; | ||
| # do the mapping here. | ||
| ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86_64)) | ||
| TARGET_ARCH := amd64 | ||
| else ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),aarch64 arm)) | ||
| TARGET_ARCH := arm64 | ||
| endif | ||
| endif | ||
| endif |
Signed-off-by: michaelawyu <chenyu1@microsoft.com>
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.
Description of your changes
This pull request introduces a full build and publish pipeline for a new multi-agent Docker image, targeting both amd64 and arm64 platforms. It adds a Dockerfile for building all required Fleet and Fleet Networking agent binaries, a Makefile for orchestrating multi-arch builds using Docker Buildx, a .dockerignore file for clean builds, and a comprehensive GitHub Actions workflow to automate building, publishing, and manifest creation for multi-arch images. These changes enable seamless, automated, and repeatable multi-platform builds and publishing for the Fleet multi-agent image.
Build and Publish Pipeline for Multi-Agent Image
Build System and Docker Image Definition
docker/multi-agent.Dockerfileto build all Fleet and Fleet Networking agent binaries into a single distroless image, supporting both amd64 and arm64 architectures..github/helpers/multi-agent/Makefileto automate multi-architecture builds using Docker Buildx, with auto-detection of host architecture and support for cross-platform builds..github/helpers/multi-agent/.dockerignoreto exclude binaries and git metadata from Docker build context for cleaner, smaller images.CI/CD Automation
.github/workflows/build-publish-multi-agent-mcr.ymlGitHub Actions workflow to:I have:
make reviewableto ensure this PR is ready for review.How has this code been tested
N/A
Special notes for your reviewer
N/A