jpetazzo/nsenter — pull request #15 by thaJeztah (2014-07-24 18:57:57+00:00)
Title: Improved detection of available shell in container

docker-enter tried to open the same shell inside the container as on
the host, which failed if the container did not *have* that shell.

Additionally, (environment) variables of the host were also present in
the nsenter session.

This change;
1. Checks if a command was given as parameter
2. If no command, check if ‘bash’ is present inside the container
3. Otherwise use ‘sh’ as shell

As discussed here; https://github.com/jpetazzo/nsenter/issues/5