docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting cont

docker启动容器:

docker run -dit --name elk -p 5601:5601 -p 9200:9200 -p 5044:5044 -v E:/spring/elk/opt/elk-data:/var/lib/elasticsearch -v E:/spring/elk/etc/localtime:/et c/localtime sebp/elk:740

错误:

docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused “process_linux.go:449: container init caused “rootfs_linux.go:58: mounting \”/host_mnt/e/spring/elk/etc/localtime\” to rootfs \"/var/lib/docker/overlay2/c95a29f291cac092bf14588c67e33cdd46062f679d54f79edcc8740e4e4bc7e7/merged\" at \"/var/lib/docker/overlay2/c95a29f291cac092bf14588c67e33cdd46062f679d54f79edcc8740e4e4bc7e7/merged/usr/share/zoneinfo/UCT\" caused \“not a directory\”"": unknown: 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.
Are you trying to mount a directory onto a file (or vice-versa)?
/et c/localtime不是一个目录,所以报错
最后启动成功:docker run -dit --name elk -p 5601:5601 -p 9200:9200 -p 5044:5044 -v E:/spring/elk/opt/elk-data:/var/lib/elasticsearch sebp/elk:740

你可能感兴趣的:(docker)