Skip to content
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

hexpm/elixir Ubuntu/Debian images don't support ICMP protocol while Alpine ones do #106

Open
balena opened this issue Jan 26, 2022 · 2 comments

Comments

@balena
Copy link

balena commented Jan 26, 2022

The test consists in performing the following commands:

$ docker run --rm -ti hexpm/elixir:1.13.2-erlang-24.2.1-ubuntu-focal-20211006 sh
# iex
Erlang/OTP 24 [erts-12.2.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1]

Interactive Elixir (1.13.2) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> :socket.open(:inet, :raw, :icmp)
{:error, {:invalid, {:protocol, :icmp}}}

and repeating for each Debian/Ubuntu images available.

Then if you perform the same for Alpine Linux, it actually works:

$ docker run --rm -ti hexpm/elixir-arm64:1.13.2-erlang-24.2.1-alpine-3.15.0 sh
/ # iex
Erlang/OTP 24 [erts-12.2.1] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1]

Interactive Elixir (1.13.2) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> :socket.open(:inet, :raw, :icmp)
{:ok, {:"$socket", #Reference<0.4054872251.4063100932.145697>}}

The problem seems to be related to some missing package at build time. Reference seems to be here: https://github.com/erlang/otp/blob/aa7f201ac2405ef6bf25d3111934f89dc3e23b73/erts/emulator/nifs/common/socket_nif.c#L169. The definition HAVE_LINUX_ERRQUEUE_H seems to be missing during build time.

@josevalim
Copy link
Member

Do you know which package is missing? If so, could you please send a PR?

@aschiavon91
Copy link
Contributor

aschiavon91 commented Nov 21, 2022

I did some tests and looks like we're missing netbase package to get it work, but I can't reproduce the error in all debian/ubuntu images, for example, in the image hexpm/erlang:22.2-ubuntu-bionic-20200219 it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants