TIL: when you run Docker (or podman) on a Mac and specify a universal base image like "node" or "node:22-bullseye", podman will default to a version of that image built specifically for your architecture.
This matters if your Dockerfile is going to attempt to install things that don't exist for your binary architecture. And in any case: you want to make sure production will behave exactly like your test environment.
Spoiler alert: production will be 64-bit Intel Linux.
So I added --platform=linux/amd64
to my docker build
command, and now I can apt-get install
and npm install
things inside the Dockerfile
with exactly the same results as on a Linux host.
Top comments (0)