美文网首页
docker错误一览

docker错误一览

作者: 凉风儿 | 来源:发表于2017-03-03 22:22 被阅读0次
    1. 添加 --restart=always参数后容器状态一直处于Restarting
      解决:添加 -i参数,如:docker run -i --restart=always....
    2. Error response from daemon: driver failed programming external connectivity on endpoint lnmp (ac1a9c20be8f96388c1fc2d78983297d1d9b9feb428d8ca31cc3ff46c81d5d91): Error starting userland proxy: Bind for 0.0.0.0:80: unexpected error Permission denied
      解决
      1) 检查映射的端口是否被宿主机占用
      2) 检查docker网卡是否被禁用
    3. Error response from daemon: Conflict. The container name "/lnmp2" is already in use by container 458cc86f66bd562227e4e265aefbbf57ef9893c0d147b325bf1875f504080e7c. You have to remove (or rename) that container to be able to reuse that name..
      解决:docker run 时使用的容器名称已存在,使用另外的容器名称,或修改原来容器
    4. docker: Error response from daemon: D: drive is not shared. Please share it in Docker for Windows Settings. See 'docker run --help'.
      解决:这通常是windows下的错误,右键点击右下角docker图标 -> Settings... -> Shared Drives -> 勾选要挂载的磁盘盘符 -> apply,然后 docker run ....
    5. docker tools中使用数据卷无法将数据映射到docker容器中
      解决
      I. 打开virtualbox,选中default虚拟机,选择设置 -> 共享文件夹 -> 添加共享文件夹,将挂载的数据卷映射到虚拟机中一样的目录
      II. 设置环境虚拟机环境变量
    docker-machine env # 运行命令后,log中显示如下语句,拷贝执行
    eval $("D:\Program Files\Docker Toolbox\docker-machine.exe" env)
    

    III. 重启虚拟机

    1. Error response from daemon: --live-restore daemon configuration is incompatible with swarm mode
      解决
      I. 编辑 daemon.json 文件,将"live-restore"设置为false
    > vim /etc/docker/daemon.json
    {
    "live-restore": false
    }
    

    II. 重启 docker

    > systemctl restart docker
    

    参考https://forums.docker.com/t/error-response-from-daemon-live-restore-daemon-configuration-is-incompatible-with-swarm-mode/28428/3

    相关文章

      网友评论

          本文标题:docker错误一览

          本文链接:https://www.haomeiwen.com/subject/tqzrgttx.html