
Multi-Stage Docker Builds for Creating Tiny Go Images - transitorykris
https://medium.com/travis-on-docker/multi-stage-docker-builds-for-creating-tiny-go-images-e0e1867efe5a
======
awinter-py
Holy crap, hadn't heard of this. Sounds like it's merged to master and coming
down the pipe for 17.05. [https://docs.docker.com/engine/userguide/eng-
image/multistag...](https://docs.docker.com/engine/userguide/eng-
image/multistage-build/)

This solves a major pain point for many people working w/ dockerfiles.

~~~
transitorykris
Yep! Building smaller images is just one part of the story. There are other
pains this helps with, the biggest for me delivering images with no
unnecessary artifacts (uncompiled code, ssh keys when `go get`ing private
repos, ...)

~~~
awinter-py
yup. thanks for posting.

PS your safe sharing tool makes a lot of sense. email is nonsense for sharing
sensitive docs.

------
tqh
For Go (as it is statically linked) you can use FROM SCRATCH. It's faster,
smaller, easier. [https://blog.docker.com/2016/09/docker-
golang/](https://blog.docker.com/2016/09/docker-golang/)

