Why does Docker say it can't execute 'bash"?

Your image is based on busybox, which doesn't have a bash shell. It does have a shell at /bin/sh.

So this doesn't work:

$ docker run -it busybox bash
exec: "bash": executable file not found in $PATH2015/01/15 11:09:08 Error response from daemon: 
Cannot start container a5074af2f81f8cc1eb0076f4ec9ada5f87be1440006f54a9b06ab701fc60176a: exec:  
"bash": executable file not found in $PATH

But this does:

$ docker run -it busybox /bin/sh
/ #

There may be further complications due to your entrypoint script, but you can always override that.


How to override docker run with bash if your image has an ENTRYPOINT defined:

docker run -it --entrypoint /bin/bash <your-image>


This won't work if your image has a defined ENTRYPOINT. For these cases use: ' docker run -it --entrypoint /bin/bash '