Multistage docker builds
Hi!
We use a multistage docker build as described here: https://docs.docker.com/language/golang/build-images/#multi-stage-builds
Is this possible with Railway and are there any catches?
Docker Documentation
Build your Go image
Learn how to build your first Docker image by writing a Dockerfile
8 Replies
Project ID:
20ec97d6-7eaa-445a-911a-589b8c86d32f
You might find these helpful:
- Railway overriding railway.toml builder nixpacks with Dockerfile?
- Docker build fails on railway when it succeeds locally.
- Full Stack Development on Railway with 20robots
⚠️ experimental feature
Project: 20ec97d6-7eaa-445a-911a-589b8c86d32f
I use multistage docker builds and I've never had a problem, are you running into any problems or just inquiring?
Just inquiring, assumed there would need to be a way to pass the "target" to railway
How does it know what stage to deploy?
the last stage where the entrypoint or cmd commands are
got it, alright thanks!
no problem!