Go-compiled binary won’t run in an alpine docker container on Ubuntu host

By default, if using the net package a build will likely produce a binary with some dynamic linking, e.g. to libc. You can inspect dynamically vs. statically link by viewing the result of ldd output.bin There are two solutions I’ve come across: Disable CGO, via CGO_ENABLED=0 Force the use of the Go implementation of net … Read more