简体   繁体   中英

starting container process caused "exec: \"bash\": executable file not found in $PATH": unknown

e44671200b7c /# mysql -u root -p bash 

mysql: command not found

I was able to enter into the container "mariadb" using

docker exec -it e44671200b7c /bin/bash

but i couldn't and i have this now error

OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: \"bash\": executable file not found in $PATH": unknown

bash is not present in mariadb Docker image. Use docker exec -it e44671200b7c /bin/sh or simply docker exec -it e44671200b7c sh instead.

There are few images which do not support the interactive shell/bash. Example - Docker image mockserver/mockserver Docker Set Up

Docker Setup Page for MockServer

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM