- 论坛徽章:
- 0
|
[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 /]#
|
|