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
This commit is contained in:
parent
062ead81a8
commit
76d0853864
7
Makefile
7
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) \
|
||||
. ; \
|
||||
|
|
Loading…
Reference in New Issue
Block a user