0

在一台虚拟主机上,好多的NONE镜像,它们不是虚悬镜像,而是中间镜像,我奇怪的是

[root@vultr ~]# docker images -a
REPOSITORY                   TAG                 IMAGE ID            CREATED             SIZE
teddysun/shadowsocks-libev   latest              31be1e51f112        5 hours ago         31MB
<none>                       <none>              3b2ea5ba5b65        26 hours ago        937MB
<none>                       <none>              d628598621bd        26 hours ago        937MB
gitlab-runner                latest              5f47012d506c        26 hours ago        937MB
<none>                       <none>              7e4049247e8b        26 hours ago        926MB
<none>                       <none>              4f253eeaa8b9        26 hours ago        937MB
<none>                       <none>              8f57ed3bcaf9        26 hours ago        937MB
<none>                       <none>              51090f3e6ef1        26 hours ago        542MB
<none>                       <none>              25377af67777        26 hours ago        352MB
<none>                       <none>              8cd5fb04042d        26 hours ago        352MB
<none>                       <none>              e60d99f3e4fa        26 hours ago        352MB
openjdk                      8-jdk               09df0563bdfc        6 days ago          488MB
gitlab/gitlab-runner         latest              39b717a576ee        9 days ago          352MB

查看这些中间镜像的子镜像,发现都是gitlab-runner

[root@vultr ~]# docker image inspect --format='{{.RepoTags}} {{.Id}} {{.Parent}}' $(docker image ls -q --filter since=e60d99f3e4fa)
[teddysun/shadowsocks-libev:latest] sha256:31be1e51f112410224d635aab158cc40b803c4f098e18b3020147a6cba2ae54e 
 [gitlab-runner:latest] sha256:5f47012d506c1b0298d95ff4b72d7f3e76032e9440aaa2147e8ee14034b043b8 sha256:d628598621bd96838e65dd90e2123dcbb2c96ed879193f32d8b69a694d12a633
 

我奇怪的是为何gitlab-runner会需要这么多看起来似乎都是一样的中间镜像?这些镜像占的空间是它们的空间总和吗?还是共享的?

esolve 890
11月30日提问
1 个回答
0

/var/lib/docker/overlay2是存储目录,去看一下存储目录总大小然后和这么多个镜像总和对比下不就知道是不是共享的了

撰写答案

推广链接