I hit this error ("stat /bin/bash: no such file or directory") when running the command:
docker exec -it 80372bc2c41e /bin/bash
The solution was to identify the kind of terminal (or shell) that is available on the container. To do so, I ran:
docker inspect 80372bc2c41e
In the output from that command, I saw:
"Cmd": [
"/bin/sh",
"-c",
"gunicorn -b 0.0.0.0:7082 server.app:app"
],
This tells me that there's a /bin/sh
command available, and I was able to connect with:
docker exec -it 80372bc2c41e /bin/sh