Building Good Docker Images
Google takes this a step further and creates single binary containers with the minimal OS bits needed [1, 2]. Personally, I think this is where we need to be headed vs running a full blown ubuntu/debian/centos OS inside the container. Three benefits, 1) no OS to manage eg. no <i>apt-get update</i> or configuration management, 2) container has less of an attack surface (think shellshock -- the container does not have bash, wget, curl, etc), 3) they are lightweight. The issue is that, how you do we (container creators) know the dependency tree for the app? Sure this might be easier for Go binaries, but what about complex apps like rails and mysql? It is a major pain to figure this out, so we just use an OS, and it takes all the thinking out of it.<p>Kelsey Hightower actually published something on this topic called "Building Docker Images for Static Go Binaries" [3].<p>[1] <a href="https://registry.hub.docker.com/u/google/nodejs-hello/" rel="nofollow">https://registry.hub.docker.com/u/google/nodejs-hello/</a><p>[2] <a href="https://github.com/thockin/serve_hostname" rel="nofollow">https://github.com/thockin/serve_hostname</a><p>[3] <a href="https://medium.com/@kelseyhightower/optimizing-docker-images-for-static-binaries-b5696e26eb07" rel="nofollow">https://medium.com/@kelseyhightower/optimizing-docker-images...</a>