【问题标题】:Error response from daemon: No such container来自守护进程的错误响应:没有这样的容器
【发布时间】:2019-07-22 15:43:48
【问题描述】:

我是 docker 新手,我使用的是阿里云 ECS 实例,只是按照Documentation 操作,但在尝试这些步骤时出现错误:

xxx@ubuntu:~$ docker run -t -i training/qbots /bin/bash
root@0de606236049:/# gem install json
Fetching: json-1.8.3.gem (100%)
Building native extensions. This could take a while…
Successfully installed json-1.8.3
1 gem installed
Installing ri documentation for json-1.8.3…
Installing RDoc documentation for json-1.8.3…
root@0gf805966049:/# exit
exit
xxx@ubuntu:~$ docker commit -m “add json gem” -a “xxx” \ 0gf805966049 ouruser/qbots:v2
Error response from daemon: No such container: 0de606236049
xxx@ubuntu:~$

【问题讨论】:

    标签: alibaba-cloud


    【解决方案1】:

    通过运行docker ps -aq 列出容器可以包括已删除的容器。尝试对包含在 docker ps -aq 的输出中的容器(例如 docker rm -f)执行操作会导致错误 Error response from daemon: No such container。

    解决方法:再次运行docker rm -f

    如果有帮助,请告诉我。

    【讨论】:

      【解决方案2】:

      答案很简单,你只需要在你正在执行的命令中省略\

      不是这个

      docker commit -m “添加 json gem” -a “xxx” \ 0gf805966049 我们的用户/qbots:v2

      试试下面的:

      docker commit -m “添加 json gem” -a “xxx” 0gf805966049 ouruser/qbots:v2

      如果有帮助请告诉我,谢谢

      【讨论】:

        猜你喜欢
        • 2016-07-12
        • 1970-01-01
        • 1970-01-01
        • 2018-03-18
        • 2019-12-12
        • 2017-05-16
        • 1970-01-01
        • 2017-04-25
        • 1970-01-01
        相关资源
        最近更新 更多