I've recently learned to build a one-executable docker image without deriving from any existing common purpose base images - Ubuntu or Alpine. The executable needs to be sufficiently self contained of course, statically linked mostly. But then you can build your docker image
from scratch and copy only the executable that gets the job done.
Nice, huh? What happened to those /proc, /sys, /dev file systems? Does the image not need those to run?
This blog post did a thorough job exploring the magic underneath.
没有评论:
发表评论