3 ms·
Multi-Stage Docker Builds for Creating Tiny Go Images
- awinter-py 9y agoHoly 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/multistage-build/ https://docs.docker.com/engine/userguide/eng-image/multistag... This solves a major pain point for many people working w/ dockerfiles.
- transitorykris 9y agoYep! 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 9y agoyup. thanks for posting. PS your safe sharing tool makes a lot of sense. email is nonsense for sharing sensitive docs.
- tqh 9y agoFor 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/