Alpine docker image can't run binary

I’m working on the Uiua test runner. I have a working version that uses cargo install to download and build the binary, after which I copy it into the stage used for the resulting Docker image.

Whilst this works, it is very slow (couple of minutes of compilation). This isn’t necessarily that problematic, as releases are relatively uncommon, but I still wanted to try just using a pre-built binary from GitHub. I then started this PR, which downloads the pre-built binary as zip-file, unzips it and then tries to run it. It turned out that I needed to install the gcompat and libgcc packages, which removed a lot of the errors, except for this one:

Error relocating /usr/local/bin/uiua: __res_init: symbol not found

Any idea how to fix this? Or should I not even bother and “just” build the binary.

As I see, gcompat is a compatibility layer for musl GitHub - Stantheman/gcompat: glibc compatibility layer for musl (mirror) - Do not submit PRs here! Use the official Git repository ->. So, maybe, we still need musl-dev in Dockerfile.

1 Like