Skip to content

Commit c3fbe97

Browse files
committed
feat(build): add buildx supportjkjkk:q
1 parent 6e3c5f8 commit c3fbe97

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ DEV_ENV_IMAGE := drycc/go-dev
88
DEV_ENV_WORK_DIR := /go/src/${REPO_PATH}
99
DEV_ENV_PREFIX := docker run --rm -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR}
1010
DEV_ENV_CMD := ${DEV_ENV_PREFIX} ${DEV_ENV_IMAGE}
11+
PLATFORM ?= linux/amd64,linux/arm64
1112

1213
# SemVer with build information is defined in the SemVer 2 spec, but Docker
1314
# doesn't allow +, so we use -.
@@ -46,6 +47,9 @@ docker-build: build
4647
docker build ${DOCKER_BUILD_FLAGS} -t ${IMAGE} rootfs
4748
docker tag ${IMAGE} ${MUTABLE_IMAGE}
4849

50+
docker-buildx:
51+
docker buildx build --platform ${PLATFORM} -t ${IMAGE} rootfs --push
52+
4953
check-kubectl:
5054
@if [ -z $$(which kubectl) ]; then \
5155
echo "kubectl binary could not be located"; \

0 commit comments

Comments
 (0)