louketo / louketo-proxy

A OpenID / Proxy service
Apache License 2.0
950 stars 343 forks source link

Binary not linked statically anymore #666

Open escoand opened 4 years ago

escoand commented 4 years ago

Title

Summary

I've upgraded from keycloak-gatekeeper version 10.0.1 (git+sha: 691bc4c, built: 08-05-2020) to louketo-proxy 1.0.0 but failing to get it running with my previous configuration.

Environment

Expected Results

The binary is linked statically, to be able to run it on any x86_64 Linux system.

Actual Results

The linux x86_64 binary is not statically linked anymore, which fails on musl systems (Alpine Linux):

# ldd /usr/local/bin/keycloak-gatekeeper
/lib/ld-musl-x86_64.so.1: /usr/local/bin/keycloak-gatekeeper: Not a valid dynamic program
# ldd /usr/local/bin/louketo-proxy
        /lib64/ld-linux-x86-64.so.2 (0x7f2178c4f000)
        libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7f2178c4f000)
        libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f2178c4f000)

This could be fixed easily with (but is not a perfect solution):

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

Steps to reproduce

Additional Information

mreinli commented 4 years ago

Having the exact same problem here. Fixed it by installing the libc6-compat package using apk.

apk add libc6-compat

However, it would be nice if we could run it in a vanilla Alpine Linux image.