If you aren’t using mutli-stage builds, you should: Docker Multi-Stage Builds | Codefresh
Here’s a mutli-stage dockerfile
from our nodejs project that deploys to Fly: serverless-dns/node.Dockerfile at 04a1184189905fcbe3e28dedff61f3c70190c2b0 · serverless-dns/serverless-dns · GitHub (size is ~150M, I think…)
I’ve been meaning to experiment with railway nixpacks, but unsure whether using it as-is optimizes for the image size, as well: Build images with nixpacks