[erlang-questions] Strange interaction between Docker and Erlangs ports (exit_status lost)
Thu Dec 17 11:31:22 CET 2015
Ah, docker at its best )
$ for iter in $(seq 1 100); do echo -n "$iter " 1>&2 ; docker run --rm
edevil/docker-erlang-bug bash -c "sleep 1; erl -noshell -s test run -s init
stop" 2>/dev/null; done | sort | uniq -c
for iter in $(seq 1 100); do echo -n "$iter " 1>&2 ; docker run --rm
edevil/docker-erlang-bug erl -noshell -s test run -s init stop 2>/dev/null;
done | sort | uniq -c
So you should either use bash/sleep trick or try find a bug in docker.
Honestly, I just gave up ) Especially given that it's not very convinient
to use erlang distribution inside docker containers without something like
2015-12-16 14:47 GMT+03:00 André Cruz <andre@REDACTED>:
> I've run into a strange problem when using Erlang and Docker. I have a
> small PoC that uses open_port to launch an "ls" command and, under normal
> circumstances, I get the exit_status message and the program terminates.
> However, if I run the command directly via "docker run", it seems the
> message is lost. The "ls" command is executed and terminates, but I don't
> get the "exit_status" message.
> This issue seems related to an old message to the list:
> The relevant code and Dockerfile can be found here:
> The built image: https://hub.docker.com/r/edevil/docker-erlang-bug/
> Docker issue:
> Now, I don't even know if this is a Docker issue, or an Erlang issue, or
> neither. Can someone shed some light on this issue?
> Thank you and best regards,
> André Cruz
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions