Build for the platform you deploy to, not the one you are on
An image built on an Apple Silicon laptop is arm64. The server is probably amd64. It runs under emulation, slowly, or not at all.
docker build --platform linux/amd64 -t app .In CI the runner is usually amd64 already. Locally, set DOCKER_DEFAULT_PLATFORM=linux/amd64 in your shell for the projects that deploy there.
docker