@Jeff looks like my internal registry is messed up, if I build using docker hub in the Dockerfile everything seems normal:
(ansible-2.12) dev-debian:app (master):$ grep -i targetp Dockerfile
FROM --platform=$TARGETPLATFORM alpine:3.13
ARG TARGETPLATFORM
RUN echo building for $TARGETPLATFORM $(file /bin/busybox) $(ldd /bin/busybox)
(ansible-2.12) dev-debian:app (master):$ docker buildx build . --build-context=app-src=. --platform linux/amd64,linux/arm64,linux/arm/v7 -t cthulhoo/multiarch-test:latest --progress plain --no-cache 2>&1 | grep buildi
#17 [linux/amd64 stage-0 4/7] RUN echo building for linux/amd64 $(file /bin/busybox) $(ldd /bin/busybox)
#0 0.061 building for linux/amd64 /bin/busybox: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, stripped /lib/ld-musl-x86_64.so.1 (0x7fceee9d0000) libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7fceee9d0000)
#22 [linux/arm64 stage-0 4/7] RUN echo building for linux/arm64 $(file /bin/busybox) $(ldd /bin/busybox)
#0 0.130 building for linux/arm64 /bin/busybox: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-aarch64.so.1, stripped /lib/ld-musl-aarch64.so.1 (0x5500000000) libc.musl-aarch64.so.1 => /lib/ld-musl-aarch64.so.1 (0x5500000000)
#23 [linux/arm/v7 stage-0 4/7] RUN echo building for linux/arm/v7 $(file /bin/busybox) $(ldd /bin/busybox)
#0 0.137 building for linux/arm/v7 /bin/busybox: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-armhf.so.1, stripped /lib/ld-musl-armhf.so.1 (0x40000000) libc.musl-armv7.so.1 => /lib/ld-musl-armhf.so.1 (0x40000000)
if i’m using my registry:2 instance, things become broken:
(ansible-2.12) dev-debian:app (master):$ grep -i targetp Dockerfile
FROM --platform=$TARGETPLATFORM registry.fakecake.org/alpine:3.13
ARG TARGETPLATFORM
RUN echo building for $TARGETPLATFORM $(file /bin/busybox) $(ldd /bin/busybox)
(ansible-2.12) dev-debian:app (master):$ docker buildx build . --build-context=app-src=. --platform linux/amd64,linux/arm64,linux/arm/v7 -t cthulhoo/multiarch-test:latest --progress plain --no-cache 2>&1 | grep buildi
#17 [linux/arm64 stage-0 4/7] RUN echo building for linux/arm64 $(file /bin/busybox) $(ldd /bin/busybox)
#0 0.063 building for linux/arm64 /bin/busybox: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, stripped /lib/ld-musl-x86_64.so.1 (0x7f0d2e42b000) libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7f0d2e42b000)
#22 [linux/amd64 stage-0 4/7] RUN echo building for linux/amd64 $(file /bin/busybox) $(ldd /bin/busybox)
#22 0.061 building for linux/amd64 /bin/busybox: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, stripped /lib/ld-musl-x86_64.so.1 (0x7f2397776000) libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7f2397776000)
#25 [linux/arm/v7 stage-0 4/7] RUN echo building for linux/arm/v7 $(file /bin/busybox) $(ldd /bin/busybox)
#0 0.047 building for linux/arm/v7 /bin/busybox: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, stripped /lib/ld-musl-x86_64.so.1 (0x7ff828930000) libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7ff828930000)
i’ll try to take a look at this later today, thanks for reporting.
i probably should be switching to Harbor, registry:2 is somewhat opaque in its workings. or maybe it’s just me.