来自守护程序的错误响应:没有这样的容器

时间:2019-02-28 16:49:01

标签: alibaba-cloud

我是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:~$

2 个答案:

答案 0 :(得分:1)

通过运行docker ps -aq列出容器可以包括已删除的容器。尝试对docker ps -aq的输出中包含的容器(例如docker rm -f)执行操作,将导致错误来自守护程序的错误响应:没有这样的容器。

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

让我知道是否有帮助。

答案 1 :(得分:0)

答案很简单,您只需在执行的命令中省略@Post('user') async createUser(@Res() res, @Req() req) { if(req.method=='POST') { //do user creating work }else { //do user updating work } } @Put('user') async updateUser(@Res() res, @Req() req) { this.createUser(res, req); }

代替这个

  

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

尝试以下操作:

  

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

让我知道是否有帮助,谢谢

相关问题