Multi-Stage Docker Builds for Creating Tiny Go Images

I’ve talked about how to make tiny Docker images a fair bit in the past, but now that Docker has multi-stage builds, it’s time to revisit the topic. In the past, we had to build the binary in one step, then take the results and build the docker image in another step. It was a bit annoying and confusing and required a bit of trickery. Let’s see if multi-stage builds make things better.



Founder, CTO at GoChain - Building and breaking things

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store