e44671200b7c /# mysql -u root -p bash
mysql: command not found
我可以进入集装箱“mariadb”使用
docker exec -it e44671200b7c /bin/bash
但我不能,我有这个现在的错误
OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: \"bash\": executable file not found in $PATH": unknown
2条答案
按热度按时间fkvaft9z1#
mariadb
Docker映像中不存在bash
请改用docker exec -it e44671200b7c /bin/sh
或仅使用docker exec -it e44671200b7c sh
vlju58qv2#
有几个图像不支持交互式shell/bash. Example - Docker图像mockserver/mockserver Docker设置
Docker Setup Page for MockServer