Docker service create后为何说no such image
请问我用 Docker service create --replicas 2 --name test test 后为何说no such image但我image 是用pull centos 下来save 转存再load 进系统改名成test 后再service create
我docker images 也有看到
# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
# docker pull centos:latest
latest: Pulling from library/centos
469cfcc7a4b3: Pull complete
Digest: sha256:989b936d56b1ace20ddf855a301741e52abca38286382cba7f44443210e96d16
Status: Downloaded newer image for centos:latest
# docker run -idt centos
a980c850425f94be67161dfc6faaa42713555e78ba972ca3920922e3be86e753
# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a980c850425f centos "/bin/bash" 27 seconds ago Up 17 seconds sharp_torvalds
# docker commit a980c850425f ct7
sha256:c55fc73acb5a019fffd01bf30b2f5b15203cbfd4ccf3063cd2debddd32545b1c
# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ct7 latest c55fc73acb5a 5 seconds ago 199MB
centos latest e934aafc2206 6 weeks ago 199MB
# 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
# 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
#
我的问题好像是没有digest ,但直接 commit 后就没有了 close it
必须上传至自己的docker hub 就有digest 了
页:
[1]