3 ms·
I strongly suggest a container or VM for building because of hygiene. A Golang binary is not completely standalone (do a ldd if you don't believe me). Just copy
by choeger 6y ago
I strongly suggest a container or VM for building because of hygiene. A Golang binary is not completely standalone (do a ldd if you don't believe me). Just copying might lead to bizarre runtime errors. And if course, if you are truly paranoid, there is the kernel ABI to consider.
But more likely than that you might end up with developer artifacts (environment variables, paths) inside your binary. So at least guard against this before shipping.