首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >docker提交失败,并显示“没有这样的id”

docker提交失败,并显示“没有这样的id”
EN

Stack Overflow用户
提问于 2015-05-30 10:48:09
回答 1查看 3.5K关注 0票数 2

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

正在尝试更新和提交映像。

收到一条我不理解的错误消息。

代码语言:javascript
复制
$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 
EN

回答 1

Stack Overflow用户

发布于 2015-05-30 10:48:09

看起来我用错了id。

“镜像id”与“容器ID”不同。

后者是在提示"root@6a2012d33405“中出现在"root@”之后的内容。

这是可行的:

代码语言:javascript
复制
$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
票数 6
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30541703

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档