I’m experimenting with docker and go and now I’m building the application outside the docker image and copies the built application. I have tried busybox and alpine which are really small images and everything seems to work nicely. The go application is a statically build executable so I guess it really don’t need much from the runtime.
However I wonder if anyone here has used any other image and why?
You can pretty much use FROM scratch, but there are a couple of details. A resolv.conf for name resolution is one, a suite of CA certificates for HTTPS is another. People have done experiments though:
(They seem to skip the points I mentioned above, so I guess that’s often not essential.)
This seems really good. They handle certificates in the two phase build at the end of the page. I tested if resolving works by building a container based on scratch, The resolv file was empty, but the program did a net.LookupHost() and it worked