Open voron opened 3 years ago
This can be solved by either symlinking to the muslc lib in the dockerfile (the c lib that Alpine uses instead of glibc) or by compiling the go binaries with CGO_ENABLED=0, which will force go to include go implementations of the networking library instead of dynamically linking to the c lib that would have them. I will defer to @splicemaahs regarding this, but the fix can be carried out in the next release.
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags '-s' src/myapp/myapp.go
GOOS=linux GOARCH=amd64
SSIA
How to reproduce:
And the output is
The issue is that splicectl binary is dynamically linked
Temporary work-around is to install
libc6-compat
I suppose the correct way should use is to build static binaries.
We have
kubectl
as an example - it works w/o issues in the vanilla alpine image as it's static binary