zoukankan      html  css  js  c++  java
  • docker搭建一键安装包lnmp

    参考: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,结果仍然报错;

    越努力,越幸运!!! good good study,day day up!!!
  • 相关阅读:
    centos 7 安装Telnet并设为开机自启动、开防火墙端口
    cenos 7 中firewalld开放服务端口
    来自鸟哥的lftp客户端软件使用方法
    关闭Linux无用端口
    家用路由器网络设置DMZ区
    Linux中退出循环命令
    shell函数基本概念
    inode节点用尽处理
    xfs格式化、ext4格式化并指定inode区别
    dd备份命令使用
  • 原文地址:https://www.cnblogs.com/canglongdao/p/12177273.html
Copyright © 2011-2022 走看看