Skip to content

feat: switch to multi-agent image (1/) - #1335

Open
Chen Yu (michaelawyu) wants to merge 2 commits into
Azure:mainfrom
michaelawyu:feat/multi-agent
Open

feat: switch to multi-agent image (1/)#1335
Chen Yu (michaelawyu) wants to merge 2 commits into
Azure:mainfrom
michaelawyu:feat/multi-agent

Conversation

@michaelawyu

Copy link
Copy Markdown
Contributor

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

  • Added docker/multi-agent.Dockerfile to build all Fleet and Fleet Networking agent binaries into a single distroless image, supporting both amd64 and arm64 architectures.
  • Added .github/helpers/multi-agent/Makefile to automate multi-architecture builds using Docker Buildx, with auto-detection of host architecture and support for cross-platform builds.
  • Added .github/helpers/multi-agent/.dockerignore to exclude binaries and git metadata from Docker build context for cleaner, smaller images.

CI/CD Automation

  • Introduced .github/workflows/build-publish-multi-agent-mcr.yml GitHub Actions workflow to:
    • Build and publish the multi-agent image for both amd64 and arm64 to Azure Container Registry (ACR).
    • Create and push a multi-arch manifest for the image.
    • Handle environment setup for both x86_64 and ARM64 runners, including manual installation of Docker and Azure CLI when needed.

I have:

  • Run make reviewable to ensure this PR is ready for review.

How has this code been tested

N/A

Special notes for your reviewer

N/A

Signed-off-by: michaelawyu <chenyu1@microsoft.com>
@michaelawyu

Copy link
Copy Markdown
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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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.Dockerfile to build Fleet + Fleet Networking agent binaries into a single Azure Linux distroless image.
  • Add helper Makefile + .dockerignore to 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
Comment thread .github/workflows/build-publish-multi-agent-mcr.yml Outdated
Signed-off-by: michaelawyu <chenyu1@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants