0

问题描述:docker启动报/bin/bash 找不到,但我在/bin 文件中石油bash的

错误信息:docker: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "exec: "/bin/bash": stat /bin/bash: no such file or directory".

3个回答

0

你的/bin文件夹里有,不代表镜像里的/bin文件夹里有。

0

docker 里建议用sh

0

docker run -p 3306:3306 --name mymysql -v $PWD/conf/my.cnf:/etc/mysql/my.cnf -v $PWD/logs:/logs -v $PWD/data:/mysql_data -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.6
cda7680be97ffc521c4b5ade5a0ef104c141bb87a3ba2c59df0c128a55d92e31
/usr/bin/docker-current: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:364: container init caused "rootfs_linux.go:54: mounting \"/root/mysql/conf/my.cnf\" to rootfs \"/var/lib/docker/overlay2/8a80b518e05425a81a7e553cb4e71c8fbd580ed0eaab3656db7a41731a1d3c99/merged\" at \"/var/lib/docker/overlay2/8a80b518e05425a81a7e553cb4e71c8fbd580ed0eaab3656db7a41731a1d3c99/merged/etc/mysql/mysql.cnf\" caused \"not a directory\"""
: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type.

撰写答案

相似问题