Interview Prep/Docker/Image design and Dockerfile decisions

You must support both amd64 and arm64 users (Apple Silicon laptops, Graviton in prod).

IntermediateScenarioImage design and Dockerfile decisions
Answer

Situation read → Need a multi-arch manifest list.

What I'd do →

docker buildx create --use --name multi
docker buildx build --platform linux/amd64,linux/arm64 \
  -t registry.example.com/app:1.4.0 --push .

In the Dockerfile use ARG TARGETARCH for arch-specific downloads and cross-compile in the build stage with FROM --platform=$BUILDPLATFORM to avoid slow QEMU emulation.

Why → One tag resolves to the right image per node.

Interview tip → Verify with docker buildx imagetools inspect app:1.4.0.

All Docker questions Roadmap: Docker & containers

More on Image design and Dockerfile decisions