DEV Community

Discussion on: Art of building small containers

Collapse
 
defman profile image
Sergey Kislyakov

Your build instructions for Go does not produce a static linked binary, so if any of your dependencies use some system libraries (e.g. a wrapper library around ImageMagick) you'd have to install these libraries in your base image as well. I've done a bunch of scratch images, and I'd rather have some overhead of alpine (shell, package manager, etc.) because it's much easier to debug the app inside the container that way. And also I don't have to link everything statically, which will increase the complexity of the Dockerfile instructions. Alpine + deps is the way to go if you care about disk usage, but NOT that extremely.

Collapse
 
force1267 profile image
javad asadi

Imagine a PaaS multi-tenant environment with single functions in their own containers