DockerSlim makes Ubuntu Docker images 30X smaller
dockersl.im
dockersl.im
https://github.com/cloudimmunity/docker-slim#description
Could someone elaborate on this? What kind of analysis? How does this work for different languages?
It's pretty easy to create tiny containers for Go apps. If you build the app separately then you can build your container using the scratch base image. The only gotcha is that your app needs to be statically linked. More complex Go app will have more than a single binary though, which means you need to manually keep track of those dependencies (e.g., cert files if you have an HTTPS server). Definitely doable.
Speaking of Go apps in containers. One of the common patters is including the build step in your container, but it results in big images because you end up including the build tools too. Why do people do that? Because it's convenient :) DockerSlim is a good solution for this. You keep your Dockerfile as-is. Run DockerSlim on your Go app image and the build tools and everything else you don't need is gone, so you have a tiny image :-)