From 76d08538649c7aeaec898a4c85ef57a46b572961 Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Tue, 5 Jan 2021 15:15:15 -0800 Subject: [PATCH] buildx not necessary (see details below) Without buildx you need to seriously watch your cache. Ultimately the solution here still as a hole, because the FROM image(s) in the Dockerfile will end up cached in whatever architecture goes last. We are relying on the build server not caching things, but be wary when doing local multi-architecture builds --- Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 723f5a9..d8407bd 100755 --- a/Makefile +++ b/Makefile @@ -110,7 +110,7 @@ $(CONTAINER_DOTFILES): @export DOCKER_CLI_EXPERIMENTAL=enabled && \ if $(DKR) --version | grep -q podman; then \ [ "$(HOSTARCH)" != "$(ARCH)" ] && \ - echo "Podman build on different arch not tested: probably broken" && \ + echo "Podman build on different arch is likely broken" && \ echo "See: https://github.com/containers/buildah/issues/1590"; \ $(DKR) build --platform $(OS)/$(ARCH) -t $(REGISTRY)/$(BIN):$(TAG) \ -f .dockerfile-$(BIN)-$(OS)_$(ARCH) .; \ @@ -119,9 +119,8 @@ $(CONTAINER_DOTFILES): $(DKR) build -t $(REGISTRY)/$(BIN):$(TAG) \ -f .dockerfile-$(BIN)-$(OS)_$(ARCH) .; \ else \ - echo "See https://medium.com/@artur.klauser/building-multi-architecture-docker-images-with-buildx-27d80f7e2408"; \ - echo "for host qemu setup if the buildx command fails"; \ - $(DKR) buildx build --load \ + echo "Building for different architecture: forcing pull/no-cache"; \ + $(DKR) build --pull --no-cache \ -t $(REGISTRY)/$(BIN):$(TAG) -f .dockerfile-$(BIN)-$(OS)_$(ARCH) \ --platform $(OS)/$(ARCH) \ . ; \