File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null | sed 's/-di
99
1010MCP_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+
1215DOCKER_BUILDER ?= docker buildx
1316DOCKER_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
1922build-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
You can’t perform that action at this time.
0 commit comments