Hey all,
As you know, golang allow cross-compilation for many platforms.
I faced issue when was compiling for Linux x86_64 under Alpine container. Final binary could not run on Linux with following error:
sh: ./server: /lib/ld-musl-x86_64.so.1: bad ELF interpreter: No such file or directory
So, to fix this we need to disable CGO
. Just set CGO_ENABLED=0
.
Happy coding!