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

Alpine OTP 21 image missing sftpd files #222

Open
krgn opened this issue Apr 30, 2019 · 3 comments
Open

Alpine OTP 21 image missing sftpd files #222

krgn opened this issue Apr 30, 2019 · 3 comments

Comments

@krgn
Copy link

krgn commented Apr 30, 2019

HI,

I'm trying to build an application which relies on

/usr/local/lib/erlang/lib/ssh-4.7.6/src/ssh_sftpd.erl

to be present. However, in the alpine builds, that file is unfortunately missing. This is the error I'm getting trying to build my app:

== Compilation error in file lib/channel.ex ==
** (RuntimeError) error parsing file /usr/local/lib/erlang/lib/ssh-4.7.6/src/ssh_sftpd.erl, got: {:error, :enoent}
    (elixir) lib/record/extractor.ex:84: Record.Extractor.read_file/2
    (elixir) lib/record/extractor.ex:50: Record.Extractor.extract_record/2
    lib/channel.ex:8: (module)
    (stdlib) erl_eval.erl:680: :erl_eval.do_apply/6
could not compile dependency :sftpd, "mix compile" failed. You can recompile this dependency with "mix deps.compile sftpd", update it with "mix deps.update sftpd" or clean it with "mix deps.clean sftpd"

The base image I'm using is elixir:1.8.1-alpine which in turn depends on elixir:21-alpine.

Thanks for any hints.

@krgn krgn changed the title Alpine OTP 21 image misisng sftpd files Alpine OTP 21 image missing sftpd files Apr 30, 2019
@garazdawi
Copy link
Contributor

All source files are stripped from the image. So if you need the source you will have to build your own image.

I'm not sure what the record extractor is doing, but it could be possible to patch it to not need the source files but instead use the AST in the beam files debug chunk.

@krgn
Copy link
Author

krgn commented Apr 30, 2019

Thanks for your reply. I might be able to manually maintain that file somewhere else as a workaround. I do get the size argument for stripping the sources, but its a bit of an unexpected difference to, say, the debian based image, where those files are shipped as part of the image.

@c0b
Copy link
Collaborator

c0b commented Jun 11, 2019

I'm trying to build an application which relies on
/usr/local/lib/erlang/lib/ssh-4.7.6/src/ssh_sftpd.erl

Could you describe some more why does this app need to read erl source code? I've seen some Erlang app is including .hrl header files for record definition, like C based library projects have header files and .c files, but in the *-devel packages usually only have the headers files, and users are expected to include its header files only

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