[erlang-questions] Attaching to running release in docker container

Tristan Sloughter t@REDACTED
Tue Jan 22 23:59:48 CET 2019


`attach` is only for if you use the `start` (the Dockerfile example you link to uses `foreground`) which runs the release with `run_erl` (see http://erlang.org/doc/man/run_erl.html).

I would advise against using `start` and thus not using `attach`. I don't think it would even be possible to make work with a docker container and would not be useful even if it could.

I wish I had removed `start` and `attach` from relx years ago because they cause confusion often and I think are rarely, if ever, needed.

Maybe it will be done for the next major release of relx and rebar3 :)

Tristan

On Tue, Jan 22, 2019, at 15:11, Igor Clark wrote:
> Hi folks,
> 
> I'm running an R21 release inside a docker container, basically doing what https://github.com/erlang/docker-erlang-example does. (It works great for my app, so thanks for that!)
> 
> When I do this:
> 
>>  docker exec -ti <container> /app/bin/app attach
> 
> I get this:
> 
>> failed to attach, user '' does not have sufficient privileges on '/tmp/erl_pipes/mwc@REDACTED/', please run node as a different user
> 
> I can run 'remote_console' just fine, and everything else is working as expected too. I've tried hacking it to work by setting ${USER} via the environment (in which case it just says "user 'XX" does not have privileges..."), and even setting all the vars I retrieve via os:getenv() when running under remote_console, but no dice.
> 
> When I 'docker exec' with /bin/sh and have a look in /tmp, there's nothing in there at all, as expected, and certainly no 'erl_pipes'. Which I guess might be something to do with the build steps.
> 
> Any clues on how to get this working?
> 
> Thanks!
> Igor
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190122/5680a679/attachment.htm>


More information about the erlang-questions mailing list