docker提交失败,“没有这样的ID”

学习如何通过Docker教程在mac上使用docker教程: https : //docs.docker.com/userguide/dockerimages/

尝试更新和提交图像。
获取我不明白的错误消息。

$docker pull training/sinatra Pulling repository training/sinatra ... 79e6bf39f993: Download complete Status: Downloaded newer image for training/sinatra:latest $docker run -t -i training/sinatra /bin/bash root@6a2012d33405:/# gem install json Fetching: json-1.8.2.gem (100%) Building native extensions. This could take a while... Successfully installed json-1.8.2 1 gem installed Installing ri documentation for json-1.8.2... Installing RDoc documentation for json-1.8.2... root@6a2012d33405:/# exit exit $docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE ... hello-world latest 91c95931e552 6 weeks ago 910 B training/sinatra latest f0f4ab557f95 11 months ago 447 MB $docker commit -m "Added json gem" -a "Yours Truly" f0f4ab557f95 ouruser/sinatra:v2 FATA[0000] Error response from daemon: no such id: f0f4ab557f95 

看起来我正在使用错误的ID。
“IMAGE ID”与“容器ID”不同。
后面是提示符“root @ 6a2012d33405”中“root @”后面出现的内容。
这工作:

 $docker commit -m "Added json gem" -a "Yours Truly" 6a2012d33405 ouruser/sinatra:v2 36c544150c9405934674b52ffc447519cb428c0526607276daab56025dfd6b11 $docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE ouruser/sinatra v2 36c544150c94 About a minute ago 452.1 MB ... hello-world latest 91c95931e552 6 weeks ago 910 B training/sinatra latest f0f4ab557f95 11 months ago 447 MB