docker公共仓库
国内docker仓库
阿里 开发者平台
docker镜像
docker镜像类似于虚拟机镜像,是个只读的模板。例如,一个镜像可以包含一个基本的操作系统环境,里面仅安装了Apache应用程序或用户需要的软件,则把它称为一个Apache镜像。
docker镜像命令
搜索镜像
docker search 镜像名
注意:docker search
命令最多返回25条结果
支持的参数:
--automated:
只显示自动化构建的镜像
--no-trunc:
输出结果未被截断 显示
-s:
显示评分为星级以上的镜像
[root@localhost ~]# docker search mysql NAME DESCRIPTION STARS OFFICIAL AUTOMATED mysql MySQL is a widely used, open-source relation… 5757 [OK] mariadb MariaDB is a community-developed fork of MyS… 1836 [OK] mysql/mysql-server Optimized MySQL Server Docker images. Create… 397 [OK] zabbix/zabbix-server-mysql Zabbix Server with MySQL database support 91 [OK] hypriot/rpi-mysql RPi-compatible Docker Image with Mysql 79 centurylink/mysql Image containing mysql. Optimized to be link… 59 [OK] zabbix/zabbix-web-nginx-mysql Zabbix frontend based on Nginx web-server wi… 47 [OK] tutum/mysql Base docker image to run a MySQL database se… 31 1and1internet/ubuntu-16-nginx-php-phpmyadmin-mysql-5 ubuntu-16-nginx-php-phpmyadmin-mysql-5 29 [OK] centos/mysql-57-centos7 MySQL 5.7 SQL database server 20 mysql/mysql-cluster Experimental MySQL Cluster Docker images. Cr… 19 schickling/mysql-backup-s3 Backup MySQL to S3 (supports periodic backup… 16 [OK] linuxserver/mysql A Mysql container, brought to you by LinuxSe… 14 zabbix/zabbix-proxy-mysql Zabbix proxy with MySQL database support 11 [OK] centos/mysql-56-centos7 MySQL 5.6 SQL database server 8 openshift/mysql-55-centos7 DEPRECATED: A Centos7 based MySQL v5.5 image… 6 circleci/mysql MySQL is a widely used, open-source relation… 4 dsteinkopf/backup-all-mysql backup all DBs in a mysql server 3 [OK] frodenas/mysql A Docker Image for MySQL 2 [OK] ansibleplaybookbundle/mysql-apb An APB which deploys RHSCL MySQL 0 [OK] openzipkin/zipkin-mysql Mirror of https://quay.io/repository/openzip… 0 cloudposse/mysql Improved `mysql` service with support for `m… 0 [OK] inferlink/landmark-mysql landmark-mysql 0 [OK] astronomerio/mysql-sink MySQL sink 0 [OK] cloudfoundry/cf-mysql-ci Image used in CI of cf-mysql-release 0 [root@localhost ~]# [root@localhost ~]# docker search -s 47 mysql Flag --stars has been deprecated, use --filter=stars=3 instead NAME DESCRIPTION STARS OFFICIAL AUTOMATED mysql MySQL is a widely used, open-source relation… 5757 [OK] mariadb MariaDB is a community-developed fork of MyS… 1836 [OK] mysql/mysql-server Optimized MySQL Server Docker images. Create… 397 [OK] zabbix/zabbix-server-mysql Zabbix Server with MySQL database support 91 [OK] centurylink/mysql Image containing mysql. Optimized to be link… 59 [OK] zabbix/zabbix-web-nginx-mysql Zabbix frontend based on Nginx web-server wi… 47 [OK] [root@localhost ~]# [root@localhost ~]# docker search --automated -s 47 mysql Flag --automated has been deprecated, use --filter=is-automated=true instead Flag --stars has been deprecated, use --filter=stars=3 instead NAME DESCRIPTION STARS OFFICIAL AUTOMATED mysql/mysql-server Optimized MySQL Server Docker images. Create… 397 [OK] zabbix/zabbix-server-mysql Zabbix Server with MySQL database support 91 [OK] centurylink/mysql Image containing mysql. Optimized to be link… 59 [OK] zabbix/zabbix-web-nginx-mysql Zabbix frontend based on Nginx web-server wi… 47 [OK] [root@localhost ~]# [root@localhost ~]# docker search --automated -s 47 --no-trunc mysql Flag --automated has been deprecated, use --filter=is-automated=true instead Flag --stars has been deprecated, use --filter=stars=3 instead NAME DESCRIPTION STARS OFFICIAL AUTOMATED mysql/mysql-server Optimized MySQL Server Docker images. Created, maintained and supported by the MySQL team at Oracle 397 [OK] zabbix/zabbix-server-mysql Zabbix Server with MySQL database support 91 [OK] centurylink/mysql Image containing mysql. Optimized to be linked to another image/container. 59 [OK] zabbix/zabbix-web-nginx-mysql Zabbix frontend based on Nginx web-server with MySQL support 47 [OK] [root@localhost ~]#
获取镜像
docker pull [仓库地址]镜像名[ : 标签]
注意:
标签默认是latest版本,即最新版本的镜像,也就是非稳定的内容。不要再生成环境中使用最新版本的镜像。
仓库地址默认是官方仓库docker hub,若从非官方仓库下载,则镜像名前指定完整的仓库地址
支持的参数:
-a:
获取仓库中所有镜像
例如:从网易蜂巢的镜像下载Ubuntu
[root@localhost docker]# docker pull hub.c.163.com/public/ubuntu:14.04 14.04: Pulling from public/ubuntu f4ab0b34ba6a: Pull complete 2f0787dc0bfe: Pull complete 54c427d77362: Pull complete 51e87d5424ff: Pull complete 5dfa314e7290: Pull complete a3ed95caeb02: Pull complete Digest: sha256:ffc2fc66f8e0bfa4b417b817054d3ebec130c8db44342b8fa394e25779633257 Status: Downloaded newer image for hub.c.163.com/public/ubuntu:14.04
从下载的过程中,我们可以看出,镜像文件一般由若干层(layer)组成,docker pull 下载时,会获取并输出镜像的各层信息。
查看镜像
docker images [镜像名[:标签]]
注意:
Docker的镜像存储在/var/lib/docker目录下。通过docker info 命令可以查看到Docker使用的存储驱动和存储的位置。
[root@localhost docker]# docker info Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 2 Server Version: 18.02.0-ce Storage Driver: overlay2 Backing Filesystem: xfs Supports d_type: true Native Overlay Diff: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge host macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog Swarm: inactive Runtimes: runc Default Runtime: runc Init Binary: docker-init containerd version: 9b55aab90508bd389d7654c4baf173a981477d55 runc version: 9f9c96235cc97674e935002fc3d78361b696a69e init version: 949e6fa Security Options: seccomp Profile: default Kernel Version: 3.10.0-693.17.1.el7.x86_64 Operating System: CentOS Linux 7 (Core) OSType: linux Architecture: x86_64 CPUs: 1 Total Memory: 1.78GiB Name: localhost.localdomain ID: 37PO:OAJ2:3JAO:ODVR:HC5B:TZVS:VF67:ZEEI:IYJS:CQHS:TYXT:YUW5 Docker Root Dir: /var/lib/docker Debug Mode (client): false Debug Mode (server): false Registry: https://index.docker.io/v1/ Labels: Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false
支持的参数:
-a:
获取仓库中所有镜像,包括那些在默认情况下不显示的中间层镜像
-f or
提供过滤条件。--filter
:
支持的过滤条件:
dangling=true :为只显示没有被使用的镜像,即显示无tag镜像。当新构建的镜像占用这个镜像ID的repo:tag时,会出现tag为空。
label (label x=y或label x=y z=u):过滤匹配指定label的镜像
before = 镜像名:标签:过滤出指定镜像之前的镜像,标签默认是latest
since= 镜像名:标签:过滤出指定镜像之后的镜像,标签默认是latest
-q:
只显示镜像的唯一ID
--no-trunc:
输出没有截断的镜像ID
--digests:显示镜像的数字摘要
--format:指定格式的输出
[root@localhost docker]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE mysql 5.7 5d4d51c57ea8 3 weeks ago 374MB hub.c.163.com/public/ubuntu 14.04 2fe5c4bba1f9 2 years ago 237MB [root@localhost docker]# docker images mysql REPOSITORY TAG IMAGE ID CREATED SIZE mysql 5.7 5d4d51c57ea8 3 weeks ago 374MB [root@localhost docker]# docker images mysql:5.7 REPOSITORY TAG IMAGE ID CREATED SIZE mysql 5.7 5d4d51c57ea8 3 weeks ago 374MB [root@localhost docker]# [root@localhost docker]# docker images -a REPOSITORY TAG IMAGE ID CREATED SIZE mysql 5.7 5d4d51c57ea8 3 weeks ago 374MB hub.c.163.com/public/ubuntu 14.04 2fe5c4bba1f9 2 years ago 237MB [root@localhost docker]# docker images -q 5d4d51c57ea8 2fe5c4bba1f9 [root@localhost docker]# docker images -q --no-trunc sha256:5d4d51c57ea80cec97503b6cdd8bebd0c904c19cf1d32270786a14b18e6ad454 sha256:2fe5c4bba1f935f179e83cd5354403d1231ffc9df9c1621967194410eaf8d942 [root@localhost docker]# [root@localhost docker]# docker images --digests REPOSITORY TAG DIGEST IMAGE ID CREATED SIZE mysql 5.7 sha256:227d5c3f54ee3a70c075b1c3013e72781564000d34fc8c7ec5ec353c5b7ef7fa 5d4d51c57ea8 3 weeks ago 374MB hub.c.163.com/public/ubuntu 14.04 sha256:ffc2fc66f8e0bfa4b417b817054d3ebec130c8db44342b8fa394e25779633257 2fe5c4bba1f9 2 years ago 237MB [root@localhost docker]# docker images --filter "dangling=true" REPOSITORY TAG IMAGE ID CREATED SIZE [root@localhost docker]# docker images -f "dangling=true" REPOSITORY TAG IMAGE ID CREATED SIZE [root@localhost docker]# [root@localhost docker]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE mysql 5.7 5d4d51c57ea8 3 weeks ago 374MB hub.c.163.com/public/ubuntu 14.04 2fe5c4bba1f9 2 years ago 237MB [root@localhost docker]# docker images --filter "before=mysql" Error response from daemon: No such image: mysql:latest [root@localhost docker]# docker images --filter "before=mysql:5.7" REPOSITORY TAG IMAGE ID CREATED SIZE hub.c.163.com/public/ubuntu 14.04 2fe5c4bba1f9 2 years ago 237MB [root@localhost docker]# docker images --filter "since=hub.c.163.com/public/ubuntu" Error response from daemon: No such image: hub.c.163.com/public/ubuntu:latest [root@localhost docker]# docker images --filter "since=hub.c.163.com/public/ubuntu:14.04" REPOSITORY TAG IMAGE ID CREATED SIZE mysql 5.7 5d4d51c57ea8 3 weeks ago 374MB [root@localhost docker]# [root@localhost docker]# docker images --format "{{.ID}}: {{.Repository}}" 5d4d51c57ea8: mysql 2fe5c4bba1f9: hub.c.163.com/public/ubuntu [root@localhost docker]# [root@localhost docker]# docker images --format "table {{.ID}}\t{{.Repository}}\t{{.Tag}}" IMAGE ID REPOSITORY TAG 5d4d51c57ea8 mysql 5.7 2fe5c4bba1f9 hub.c.163.com/public/ubuntu 14.04
添加镜像标签
docker tag 旧镜像名:旧标签 新镜像名:新标签
注意:新和旧的镜像ID完全一致,它们都指向同一个镜像文件,只是别名不同而已,docker tag类似链接的作用。
[root@localhost docker]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE mysql 5.7 5d4d51c57ea8 3 weeks ago 374MB hub.c.163.com/public/ubuntu 14.04 2fe5c4bba1f9 2 years ago 237MB [root@localhost docker]# docker tag hub.c.163.com/public/ubuntu:14.04 myUbuntu:14.04 Error parsing reference: "myUbuntu:14.04" is not a valid repository/tag: invalid reference format: repository name must be lowercase [root@localhost docker]# docker tag hub.c.163.com/public/ubuntu:14.04 myubuntu:14.04 [root@localhost docker]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE mysql 5.7 5d4d51c57ea8 3 weeks ago 374MB myubuntu 14.04 2fe5c4bba1f9 2 years ago 237MB hub.c.163.com/public/ubuntu 14.04 2fe5c4bba1f9 2 years ago 237MB
删除镜像
docker rmi 镜像名 or 镜像ID
支持的参数:
-f:
强制删除
[root@localhost docker]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE mysql 5.7 5d4d51c57ea8 3 weeks ago 374MB mysql zhc 5d4d51c57ea8 3 weeks ago 374MB myubuntu 14.04 2fe5c4bba1f9 2 years ago 237MB hub.c.163.com/public/ubuntu 14.04 2fe5c4bba1f9 2 years ago 237MB [root@localhost docker]# docker rmi mysql:zhc Untagged: mysql:zhc [root@localhost docker]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE mysql 5.7 5d4d51c57ea8 3 weeks ago 374MB myubuntu 14.04 2fe5c4bba1f9 2 years ago 237MB hub.c.163.com/public/ubuntu 14.04 2fe5c4bba1f9 2 years ago 237MB [root@localhost docker]# docker rmi 2fe5c4bba1f9 Error response from daemon: conflict: unable to delete 2fe5c4bba1f9 (must be forced) - image is referenced in multiple repositories [root@localhost docker]# docker rmi -f 2fe5c4bba1f9 Untagged: myubuntu:14.04 Untagged: hub.c.163.com/public/ubuntu:14.04 Untagged: hub.c.163.com/public/ubuntu@sha256:ffc2fc66f8e0bfa4b417b817054d3ebec130c8db44342b8fa394e25779633257 Deleted: sha256:2fe5c4bba1f935f179e83cd5354403d1231ffc9df9c1621967194410eaf8d942 Deleted: sha256:085e08b75e744804e23332efb202896749c4aff9433391a775607852d339c26e Deleted: sha256:7f622f92c76a635c16f506bced3dc1641e9390a26ee9d8cb70f8616c3a21fbdf Deleted: sha256:ae7b6867bb7b8f3a8235547e0634e7629b4008d807dc768064e760a91413a71f Deleted: sha256:3eef796012f97f23ffdb11296f6b624a0db4b32eae986da589492b974e6eb596 Deleted: sha256:b268b9bd797e1d58a176fac2a338df41437e853beb5aaa8a4159227fc38c4b72 Deleted: sha256:89688d062a0607fb50d0955de8964659e66f1bb41164b2d2b473d1edd7d8af90 [root@localhost docker]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE mysql 5.7 5d4d51c57ea8 3 weeks ago 374MB
说明:
执行 docker rmi mysql:zhc 命令,返回 Untagged: mysql:zhc,说明删除了标签,没有删除镜像文件,因为还有标签指向镜像文件。我们可以依次删除某个镜像文件的所有标签,当最后一个标签被删除时,镜像文件也会被删除。简单的做法:docker rmi -f 镜像ID。
docker rmi命令不支持删除某个仓库的所有镜像,我们可以用docker images -q来完成。
[root@localhost docker]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE mysql 5.7 5d4d51c57ea8 3 weeks ago 374MB hub.c.163.com/public/ubuntu 14.04 2fe5c4bba1f9 2 years ago 237MB hub.c.163.com/public/ubuntu zhc 2fe5c4bba1f9 2 years ago 237MB hub.c.163.com/public/ubuntu zhc14.04 2fe5c4bba1f9 2 years ago 237MB [root@localhost docker]# docker images -q hub.c.163.com/public/ubuntu 2fe5c4bba1f9 2fe5c4bba1f9 2fe5c4bba1f9 [root@localhost docker]# docker rmi -f $(docker images -q hub.c.163.com/public/ubuntu | sort -u) Untagged: hub.c.163.com/public/ubuntu:14.04 Untagged: hub.c.163.com/public/ubuntu:zhc Untagged: hub.c.163.com/public/ubuntu:zhc14.04 Untagged: hub.c.163.com/public/ubuntu@sha256:ffc2fc66f8e0bfa4b417b817054d3ebec130c8db44342b8fa394e25779633257 Deleted: sha256:2fe5c4bba1f935f179e83cd5354403d1231ffc9df9c1621967194410eaf8d942 Deleted: sha256:085e08b75e744804e23332efb202896749c4aff9433391a775607852d339c26e Deleted: sha256:7f622f92c76a635c16f506bced3dc1641e9390a26ee9d8cb70f8616c3a21fbdf Deleted: sha256:ae7b6867bb7b8f3a8235547e0634e7629b4008d807dc768064e760a91413a71f Deleted: sha256:3eef796012f97f23ffdb11296f6b624a0db4b32eae986da589492b974e6eb596 Deleted: sha256:b268b9bd797e1d58a176fac2a338df41437e853beb5aaa8a4159227fc38c4b72 Deleted: sha256:89688d062a0607fb50d0955de8964659e66f1bb41164b2d2b473d1edd7d8af90
查看镜像历史
docker history 镜像名 : 标签]
说明:镜像文件由多层组成,docker history 命令可以查看各层的信息。
支持的参数:
-f:
过滤条件
[root@localhost docker]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE mysql 5.7 5d4d51c57ea8 3 weeks ago 374MB [root@localhost docker]# docker history mysql:5.7 IMAGE CREATED CREATED BY SIZE COMMENT 5d4d51c57ea8 3 weeks ago /bin/sh -c #(nop) CMD ["mysqld"] 0B <missing> 3 weeks ago /bin/sh -c #(nop) EXPOSE 3306/tcp 0B <missing> 3 weeks ago /bin/sh -c #(nop) ENTRYPOINT ["docker-entry… 0B <missing> 3 weeks ago /bin/sh -c ln -s usr/local/bin/docker-entryp… 34B <missing> 3 weeks ago /bin/sh -c #(nop) COPY file:05922d368ede3042… 5.92kB <missing> 3 weeks ago /bin/sh -c #(nop) VOLUME [/var/lib/mysql] 0B <missing> 3 weeks ago /bin/sh -c { echo mysql-community-server m… 259MB <missing> 3 weeks ago /bin/sh -c echo "deb http://repo.mysql.com/a… 56B <missing> 3 weeks ago /bin/sh -c #(nop) ENV MYSQL_VERSION=5.7.21-… 0B <missing> 3 weeks ago /bin/sh -c #(nop) ENV MYSQL_MAJOR=5.7 0B <missing> 3 weeks ago /bin/sh -c set -ex; key='A4A9406876FCBD3C45… 22.7kB <missing> 3 weeks ago /bin/sh -c apt-get update && apt-get install… 44.7MB <missing> 3 weeks ago /bin/sh -c mkdir /docker-entrypoint-initdb.d 0B <missing> 3 weeks ago /bin/sh -c set -x && apt-get update && apt-… 4.44MB <missing> 4 weeks ago /bin/sh -c #(nop) ENV GOSU_VERSION=1.7 0B <missing> 4 weeks ago /bin/sh -c apt-get update && apt-get install… 10.2MB <missing> 4 weeks ago /bin/sh -c groupadd -r mysql && useradd -r -… 329kB <missing> 4 weeks ago /bin/sh -c #(nop) CMD ["bash"] 0B <missing> 4 weeks ago /bin/sh -c #(nop) ADD file:27ffb1ef53bfa3b9f… 55.3MB
查看镜像详细信息
docker inspect 镜像名 : 标签
说明:docker inspect 命令可以查看镜像的详细信息,包括作者,各层的数字摘要,适应架构等。
[root@localhost docker]# docker inspect mysql:5.7 [ { "Id": "sha256:5d4d51c57ea80cec97503b6cdd8bebd0c904c19cf1d32270786a14b18e6ad454", "RepoTags": [ "mysql:5.7" ], "RepoDigests": [ "mysql@sha256:227d5c3f54ee3a70c075b1c3013e72781564000d34fc8c7ec5ec353c5b7ef7fa" ], "Parent": "", "Comment": "", "Created": "2018-02-26T23:12:05.873241143Z", "Container": "ab71433329e1b67c445a55195026cc2571e0fb8ac151a2310cd3f85761af3376", "ContainerConfig": { "Hostname": "ab71433329e1", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "ExposedPorts": { "3306/tcp": {} }, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "GOSU_VERSION=1.7", "MYSQL_MAJOR=5.7", "MYSQL_VERSION=5.7.21-1debian9" ], "Cmd": [ "/bin/sh", "-c", "#(nop) ", "CMD [\"mysqld\"]" ], "ArgsEscaped": true, "Image": "sha256:19d2da1765e8a001fcd36e456828cd55ebfcfbd6cfd371897c668fc6136456e5", "Volumes": { "/var/lib/mysql": {} }, "WorkingDir": "", "Entrypoint": [ "docker-entrypoint.sh" ], "OnBuild": [], "Labels": {} }, "DockerVersion": "17.06.2-ce", "Author": "", "Config": { "Hostname": "", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "ExposedPorts": { "3306/tcp": {} }, "Tty": false, "OpenStdin": false, "StdinOnce": false, "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "GOSU_VERSION=1.7", "MYSQL_MAJOR=5.7", "MYSQL_VERSION=5.7.21-1debian9" ], "Cmd": [ "mysqld" ], "ArgsEscaped": true, "Image": "sha256:19d2da1765e8a001fcd36e456828cd55ebfcfbd6cfd371897c668fc6136456e5", "Volumes": { "/var/lib/mysql": {} }, "WorkingDir": "", "Entrypoint": [ "docker-entrypoint.sh" ], "OnBuild": [], "Labels": null }, "Architecture": "amd64", "Os": "linux", "Size": 373598431, "VirtualSize": 373598431, "GraphDriver": { "Data": { "LowerDir": "/var/lib/docker/overlay2/309dff3daceecd8931980aff444761bd86afabbd73e8574115275d33a74e0507/diff:/var/lib/docker/overlay2/5a570cc04715941db01eeb4f6a9fc439f4c4369d7bda46a0eefec184449aa8f3/diff:/var/lib/docker/overlay2/25be1b0d4f268facc9ceff5f07a7c3086ecb9474d22dd14898e64ead862f411b/diff:/var/lib/docker/overlay2/e071834564b69e0fd993b27df4dae02146450bc5cca8c3eb9edf157a5c8eda7a/diff:/var/lib/docker/overlay2/87a26a35acf4cbb24b76fd63e9fefb3b0a04965e4778746de3c244e069115a79/diff:/var/lib/docker/overlay2/4428899cd8a7578f8c16a9d56969f1352c29aabf585a550c4c7f8493f932f66b/diff:/var/lib/docker/overlay2/fe14b9741e54740354916fe16fcbadb7d22532308a7df95ed42ae28a976c9d94/diff:/var/lib/docker/overlay2/d4e1cb3cc067cf91bfe7413ce35e5408946fff5882bd5ba60283eb7a5020981d/diff:/var/lib/docker/overlay2/454cca721ff8096986f9e750bfa91a7e086072428880f502012f1bff1dc2c2ec/diff:/var/lib/docker/overlay2/aa1b3e6255e74a82af6e7301f09c381e3e2a0d07b0ee7af2d7fdfa146f856c8f/diff", "MergedDir": "/var/lib/docker/overlay2/6ab3570cc0227e0620bab4f7670faf692ffa39fe2c225f1664b10917eec8e6c5/merged", "UpperDir": "/var/lib/docker/overlay2/6ab3570cc0227e0620bab4f7670faf692ffa39fe2c225f1664b10917eec8e6c5/diff", "WorkDir": "/var/lib/docker/overlay2/6ab3570cc0227e0620bab4f7670faf692ffa39fe2c225f1664b10917eec8e6c5/work" }, "Name": "overlay2" }, "RootFS": { "Type": "layers", "Layers": [ "sha256:014cf8bfcb2d50b7b519c4714ac716cda5b660eae34189593ad880dc72ba4526", "sha256:292c1ee413d0cf6906b8d149c8ae2e79c12cf7bee61a6c2746db1f85cdd7122b", "sha256:8b452d78b126bd10a54579c4d6ee73c82e657fc4533a273668e73a1acac55130", "sha256:7b2001677ac98431fefbfd2461210701b994347f324beb93686766a06f096c2c", "sha256:b80c494a1fdc9b27745256595b2e2775180abe43b5873947a75be2ac59659b0b", "sha256:3cf1630a511dcbf791c18b0a607f60986f9753f27a9edbdb5763b1d160ab68d3", "sha256:921bf5c178ac403c5377663099b9eed18af48b1cc79dca4d2608ef887b7dd390", "sha256:d7758e0ab2b096bc54955304c2d6946ac3e4df29aae7166750d7486e5ffd6497", "sha256:17d36ba9421933d2309ca6c0373d8694d606eeb91536e29313595b8d76ce4aaa", "sha256:400836ab4664da9b40210d6ae4684ebfd1676ded27688c061a1544d9a0ba1946", "sha256:12ea28f10d6962172c5e090b8b22f0e080c43f7d7fc142131d08c88f0baa07b4" ] }, "Metadata": { "LastTagTime": "2018-03-20T00:16:15.643909858-07:00" } } ]
[root@localhost docker]# docker inspect -f {{".RepoDigests"}} mysql:5.7
[mysql@sha256:227d5c3f54ee3a70c075b1c3013e72781564000d34fc8c7ec5ec353c5b7ef7fa]
所有评论(0)