Build hello go binary first go build -tags netgo -ldflags "-extldflags '-lm -lstdc++ -static'" . Then build docker image docker build -t hello .