2

I am new to docker, I am using Alibaba Cloud ECS Instance and just following the Documentation but while trying these steps I got an error:

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 Answers2

3

Listing containers by running docker ps -aq can include containers that have been removed. Attempting to perform an operation on a container that was included in the output of docker ps -aq, for example docker rm -f, results in the error Error response from daemon: No such container.

Workaround: Run docker rm -f again.

Let me know if that helps.

Deepak Kamat
  • 1,880
  • 4
  • 23
  • 38
0

The answer is simple, you just need to omit \ in the command you are executing,

Instead of this

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

try the below:

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

Let me know if that helped, Thanks

Sai Sarath C P
  • 1,454
  • 2
  • 9
  • 26