Creating a minimal container image for a Go application

Lucas Jellema
3 min readMay 3, 2022
Build executable from Go source code and build Container Image from Alpine base image with binary executable

How hard can it be — to create the smallest possible container image to run a Go application? It is not hard to create a container image that contains an binary executable file — and that is what a Go application turns into during the build process. However, that does not automatically produce a very small image or one that actually can run the application successfully. There are a few things…

--

--

Lucas Jellema

Lucas Jellema is CTO and IT architect at Conclusion, The Netherlands. He is Oracle ACE Director, one time JavaOne Rockstar and programmer