New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP requests fail when without glibc #6692
Comments
I was under the impression it was built statically on Alpine with musl, which is not the case. |
I'll bet on a DNS issue related to Docker. People has already reported similar cases. |
Then in that case, if the binary is statically linked, why would this be an issue in an empty container based off of Granted I dont know much about this, not saying it is a crystal problem, just wondering. |
the crystal binary isn't statically linked with musl, which means that it's not portable. This is why |
Oh, and you need to licence your sourcecode to GPL if you statically link glibc. Just don't do it. |
Damn, I thought it was building on Alpine with musl. Forget my previous comment. |
An alternative is to use the alpine docker image and the official crystal package which will statically link musl-libc, which is portable across different libc (unlike glibc). |
Gotcha, thanks for the explanation. |
When executing an HTTP request on alpine/scratch/non glibc docker image the request fails with the error
Unhandled exception: No address found for api.github.com:443 over TCP (Socket::Error)
My test scenario
With irrelevant code removed
runner.cr
With this file included as a target in
shards.yml
Dockerfile
However, rebuilding the image using a base of
busybox:1.29.1-glibc
will execute the request just fine.Crystal Version
The text was updated successfully, but these errors were encountered: