鍍金池/ 問答/Linux/ docker創(chuàng)建nginx容器出問題

docker創(chuàng)建nginx容器出問題

命令:docker run -p 80:80 --name mynginx -v $PWD/www:/www -v $PWD/conf/nginx.conf:/etc/nginx/nginx.conf -v $PWD/logs:/wwwlogs  -d nginx
docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \"rootfs_linux.go:58: mounting \\\"/root/conf/nginx.conf\\\" to rootfs \\\"/var/lib/docker/overlay2/0d3bc40b3dbdaeaa49ca1fe50f5e4fac7a265066cb9a7eff4202b1aa5d0abdcf/merged\\\" at \\\"/var/lib/docker/overlay2/0d3bc40b3dbdaeaa49ca1fe50f5e4fac7a265066cb9a7eff4202b1aa5d0abdcf/merged/etc/nginx/nginx.conf\\\" 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.

這個問題怎么解決?

回答
編輯回答
陌璃

看看這個https://stackoverflow.com/que...

docker volume rm $(docker volume ls -q)
2017年12月24日 09:20