账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    docker 创建nginx容器时对配置文件进行挂载时报错,有那大佬热心提点提点!感谢感谢!!!!
    32
    0

    docker 以及 ngixn镜像信息如下:

    root@iZ28q62x60iZ:/srv/testServer# docker -v
    Docker version 18.03.1-ce, build 9ee9f40
    root@iZ28q62x60iZ:/srv/testServer# docker images
    REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
    nginx               latest              649dcb69b782        19 hours ago        109MB
    root@iZ28q62x60iZ:/srv/testServer# 

    执行错误报如下错误:

    root@iZ28q62x60iZ:/srv/testServer# docekr run --name nginx -d -p 80:80 -v $PWD/conf/nginx.conf:/etc/nginx/nginx.conf nginx
    No command 'docekr' found, did you mean:
     Command 'docker' from package 'docker.io' (universe)
    docekr: command not found
    root@iZ28q62x60iZ:/srv/testServer# docker run --name nginx -d -p 80:80 -v $PWD/conf/nginx.conf:/etc/nginx/nginx.conf nginx
    4db2ddccc4022c305991a1dce568fd8332087d5543a56f4a573cde69de33feb8
    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 \\\"/srv/testServer/conf/nginx.conf\\\" to rootfs \\\"/var/lib/docker/overlay2/3d4b01b3ed517480faba01aa1edb6fbb9e2dc01d5de5239e8c8d00d3a159777a/merged\\\" at \\\"/var/lib/docker/overlay2/3d4b01b3ed517480faba01aa1edb6fbb9e2dc01d5de5239e8c8d00d3a159777a/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.
    root@iZ28q62x60iZ:/srv/testServer# 
    
    1
    打赏
    收藏
    点击回答
        全部回答
    • 0
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部