diff --git a/Dockerfile b/Dockerfile index 29b1a319bc9..704d070369b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,12 +2,13 @@ ARG BASE_IMAGE=alpine:3.17 ARG JS_IMAGE=node:18-alpine3.17 +ARG JS_PLATFORM=linux/amd64 ARG GO_IMAGE=golang:1.20.1-alpine3.17 ARG GO_SRC=go-builder ARG JS_SRC=js-builder -FROM ${JS_IMAGE} as js-builder +FROM --platform=${JS_PLATFORM} ${JS_IMAGE} as js-builder ENV NODE_OPTIONS=--max_old_space_size=8000 diff --git a/Makefile b/Makefile index 90feb7749b8..5d5d9f4387b 100644 --- a/Makefile +++ b/Makefile @@ -165,15 +165,13 @@ shellcheck: $(SH_FILES) ## Run checks for shell scripts. ##@ Docker -TMP_DIR!=mktemp -d TAG_SUFFIX=$(if $(WIRE_TAGS)!=oss,-$(WIRE_TAGS)) PLATFORM=linux/amd64 build-docker-full: ## Build Docker image for development. @echo "build docker container" - cp -Lrf . $(TMP_DIR) - DOCKER_BUILDKIT=1 \ - docker build $(TMP_DIR) \ + tar -ch . | \ + docker buildx build - \ --platform $(PLATFORM) \ --build-arg BINGO=false \ --build-arg GO_BUILD_TAGS=$(GO_BUILD_TAGS) \ @@ -183,9 +181,8 @@ build-docker-full: ## Build Docker image for development. build-docker-full-ubuntu: ## Build Docker image based on Ubuntu for development. @echo "build docker container" - cp -Lrf . $(TMP_DIR) - DOCKER_BUILDKIT=1 \ - docker build $(TMP_DIR) \ + tar -ch . | \ + docker buildx build - \ --platform $(PLATFORM) \ --build-arg BINGO=false \ --build-arg GO_BUILD_TAGS=$(GO_BUILD_TAGS) \