参考:https://www.jianshu.com/p/34a625621a9a
本人使用centos7,一直报如下错误
ERROR: for lnmp_1.5 Cannot start service lnmp: 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/www/conf/nginx/nginx.conf\" to rootfs \"/var/lib/docker/overlay2/9163ba9cb6082016e61b7b37131dca9f26c63f1674fc555879d041f395b3eae1/merged\" at \"/var/lib/docker/overlay2/9163ba9cb6082016e61b7b37131dca9f26c63f1674fc555879d041f395b3eae1/merged/usr/local/nginx/conf/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
ERROR: for lnmp Cannot start service lnmp: 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/www/conf/nginx/nginx.conf\" to rootfs \"/var/lib/docker/overlay2/9163ba9cb6082016e61b7b37131dca9f26c63f1674fc555879d041f395b3eae1/merged\" at \"/var/lib/docker/overlay2/9163ba9cb6082016e61b7b37131dca9f26c63f1674fc555879d041f395b3eae1/merged/usr/local/nginx/conf/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
ERROR: Encountered errors while bringing up the project.
解决办法一:
参考链接:https://blog.csdn.net/qierkang/article/details/92657302,仍然报错
解决办法二:
不挂载目录,可正常访问,docker-compose.yml配置如下
解决办法三:
升级centos7至centos7.6,结果仍然报错;