gliderlabs / herokuish

Utility for emulating Heroku build and runtime tasks in containers
MIT License
1.45k stars 150 forks source link

add rng-tools for more entropy in `/dev/random`? #659

Open ltalirz opened 3 years ago

ltalirz commented 3 years ago

libsodium requires some "randomness" at startup - if not enough entropy is available from /dev/random it hangs.

In containers there can be little sources for entropy. As described in the docs of libsodium, one workaround is to install the rng-tools (here some docs on what those do).

Would that be considered as an addition to the herokuish Dockerfiles? If yes, happy to make a PR if you let me know where this should go.

P.S. libsodium is used e.g. in libzmq => pyzmq => jupyter, i.e. this affects anyone wanting to run jupyter notebooks via voila apps which would randomly hang in herokuish containers.

Related issues https://github.com/jedisct1/libsodium/issues/933 https://github.com/zeromq/libzmq/issues/3183 https://github.com/zeromq/pyzmq/issues/1224#issuecomment-444314061 https://github.com/jupyter/help/issues/480#issuecomment-451353915

josegonzalez commented 3 years ago

Does heroku have that? My concern is moving too far away from their base offering. Not opposed to it, just want to be careful of how we differ so that folks don't get the wrong idea.

Additionally, I wonder if this is something that would impact cloud native buildpacks, which are the future of buildpacks in general. Would be great if you can inquire in that community slack about this as well.