bitnami / wait-for-port

CLI tool for waiting until a TCP port reaches the desired state
https://bitnami.com
Apache License 2.0
39 stars 11 forks source link

Failed to run on Alpine #9

Closed risik closed 2 years ago

risik commented 2 years ago

Runing executable on Alpine fails:

# ./wait-for-port-linux-amd64 --help
sh: ./wait-for-port-linux-amd64: not found

The same binary run OK on Debian.

Workaround option 1:

apk add gcompat

Workaround option 2:

mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2

Looks like something with compile options but I'm not a GoLang guy :(

marcosbc commented 2 years ago

Hi @risik, I believe this happens because Alpine does not use the GNU C library (glibc), but musl.

A workaround could be to build the binaries statically. Unfortunately that would increase their size a lot, and size we don't support Alpine, we believe it's best to avoid it.

However, feel free to send a contribution that builds an additional binary (apart from the glibc ones) that is statically compiled and is compatible with musl. We would be happy to help with the review and release once it is ready.

marcosbc commented 2 years ago

Since this issue is already a bit old, I'm going to proceed to close it. But contributions are welcome, so feel free to share any improvements!