Docker – exec: "bash": executable file not found in $PATH
If bash
shell is not working, try sh
.
Terminal
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3d1588519433 markdownhtml:0.1 "java -jar app.jar" About an hour ago Up About an hour 0.0.0.0:80->8080/tcp gracious_haibt
$ docker exec -it 3d1588519433 bash
OCI runtime exec failed: exec failed: container_linux.go:349:
starting container process caused "exec: \"bash\": executable file not found in $PATH": unknown
The truth is, not every image is using the bash shell; try sh shell.
Terminal
$ docker exec -it 3d1588519433 sh
/home/hello #
Thanks sir! In Alpine Linux there is another yet shell – ash))
Thanks Man!!!!!!!!!
Thanks a lot 🙂
Thanks… You save my life 🙂
It works perfect
docker exec -it 147bf86f4612 sh
Thanks a lot my friend!
thank you
Thank you.
Perfect….
Geeeeeeeeeeeeeeeeeeez thanks man. Exactly what I needed. I’m so used to running a ubuntu image I forgot this time I’m running an alpine. *face slap*
Very useful tip, thank you!
Thank You
Thank you!
Thnx!
Wow, thank you very much!