Skip to content

.tip

· one of the small things

Build for the platform you deploy to, not the one you are on

An image built on an Apple Silicon laptop is arm64, and the server is probably amd64. There it runs slowly under emulation, or not at all.

docker build --platform linux/amd64 -t app .

CI runners are usually amd64 already. Locally, set DOCKER_DEFAULT_PLATFORM=linux/amd64 in your shell for the projects that deploy there.

docker