Specify docker platform args for build and run commands

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2022-02-01 13:34:16 +01:00
parent a1ce176fc4
commit 74ddfe901a

View File

@ -122,6 +122,7 @@ docker-build-%:
docker pull --platform=linux/$(ARCH) $(BASEIMAGE) docker pull --platform=linux/$(ARCH) $(BASEIMAGE)
DOCKER_BUILDKIT=1 \ DOCKER_BUILDKIT=1 \
$(DOCKER) build \ $(DOCKER) build \
--platform=linux/$(ARCH) \
--progress=plain \ --progress=plain \
--build-arg BASEIMAGE="$(BASEIMAGE)" \ --build-arg BASEIMAGE="$(BASEIMAGE)" \
--build-arg GOLANG_VERSION="$(GOLANG_VERSION)" \ --build-arg GOLANG_VERSION="$(GOLANG_VERSION)" \
@ -131,6 +132,7 @@ docker-build-%:
--tag $(BUILDIMAGE) \ --tag $(BUILDIMAGE) \
--file $(DOCKERFILE) . --file $(DOCKERFILE) .
$(DOCKER) run \ $(DOCKER) run \
--platform=linux/$(ARCH) \
-e DISTRIB \ -e DISTRIB \
-e SECTION \ -e SECTION \
-v $(ARTIFACTS_DIR):/dist \ -v $(ARTIFACTS_DIR):/dist \