Skip to content

Commit 184ab2a

Browse files
committed
use buildx
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
1 parent 3ab24ac commit 184ab2a

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/tag.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ jobs:
3737
- name: 'Build Images'
3838
env:
3939
DOCKER_BUILD_ARGS: "--push --platform linux/amd64,linux/arm64"
40-
DOCKER_BUILDER: "docker buildx"
4140
run: |
4241
# if workflow_dispatch is used, use the version input
4342
if [ -n "${{ github.event.inputs.version }}" ]; then

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null | sed 's/-di
99

1010
MCP_IMAGE_NAME ?= mcp
1111

12+
# Local architecture detection to build for the current platform
13+
LOCALARCH ?= $(shell uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')
14+
1215
DOCKER_BUILDER ?= docker buildx
1316
DOCKER_BUILD_ARGS ?= --progress=plain --builder $(BUILDX_BUILDER_NAME) --pull --load --platform linux/$(LOCALARCH)
1417

@@ -17,4 +20,4 @@ BUILDX_BUILDER_NAME=kagent-builder
1720

1821
# Build the MCP image
1922
build-mcp:
20-
docker build -t $(DOCKER_REGISTRY)/$(DOCKER_REPO)/$(MCP_IMAGE_NAME):$(VERSION) -t $(DOCKER_REGISTRY)/$(DOCKER_REPO)/$(MCP_IMAGE_NAME):latest -f mcp/Dockerfile ./mcp
23+
$(DOCKER_BUILDER) build $(DOCKER_BUILD_ARGS) -t $(DOCKER_REGISTRY)/$(DOCKER_REPO)/$(MCP_IMAGE_NAME):$(VERSION) -t $(DOCKER_REGISTRY)/$(DOCKER_REPO)/$(MCP_IMAGE_NAME):latest -f mcp/Dockerfile ./mcp

0 commit comments

Comments
 (0)