免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 52936 | 回复: 3
打印 上一主题 下一主题

Docker service create后为何说no such image [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2018-05-22 11:02 |只看该作者 |倒序浏览
请问我用 Docker service create --replicas 2 --name test test 后为何说no such image
但我image 是用pull centos 下来save 转存再load 进系统改名成test 后再service create
我docker images 也有看到

论坛徽章:
0
2 [报告]
发表于 2018-05-22 13:43 |只看该作者
[root@S36 /]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE

[root@S36 /]# docker pull centos:latest
latest: Pulling from library/centos
469cfcc7a4b3: Pull complete
Digest: sha256:989b936d56b1ace20ddf855a301741e52abca38286382cba7f44443210e96d16
Status: Downloaded newer image for centos:latest

[root@S36 /]# docker run -idt centos
a980c850425f94be67161dfc6faaa42713555e78ba972ca3920922e3be86e753

[root@S36 /]# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
a980c850425f        centos              "/bin/bash"         27 seconds ago      Up 17 seconds                           sharp_torvalds

[root@S36 /]# docker commit a980c850425f ct7
sha256:c55fc73acb5a019fffd01bf30b2f5b15203cbfd4ccf3063cd2debddd32545b1c
[root@S36 /]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
ct7                 latest              c55fc73acb5a        5 seconds ago       199MB
centos              latest              e934aafc2206        6 weeks ago         199MB

[root@S36 /]# docker images --digests
REPOSITORY          TAG                 DIGEST                                                                    IMAGE ID            CREATED             SIZE
ct7                 latest              <none>                                                                    c55fc73acb5a        33 seconds ago      199MB
centos              latest              sha256:989b936d56b1ace20ddf855a301741e52abca38286382cba7f44443210e96d16   e934aafc2206        6 weeks ago         199MB

[root@S36 /]# docker service create --replicas 2 -d --name ct7 ct7
image ct7:latest could not be accessed on a registry to record
its digest. Each node will access ct7:latest independently,
possibly leading to different nodes running different
versions of the image.

oeyesoculos6izc2qhvzk6s25
[root@S36 /]#

论坛徽章:
0
3 [报告]
发表于 2018-05-22 13:45 |只看该作者
我的问题好像是没有digest ,但直接 commit 后就没有了

论坛徽章:
0
4 [报告]
发表于 2018-05-22 15:17 |只看该作者
close it

必须上传至自己的docker hub 就有digest 了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP