您好我正在尝试提取我机器中的泊坞窗图像数量
如果我运行命令docker info
,它会给我这个:
Containers: 15
Images: 27
Driver: aufs
Root Dir: /var/lib/docker/aufs
Dirs: 57
Username: miggom
Registry: [https://index.docker.io/v1/]
WARNING: No swap limit support
如果我运行命令docker images -a
,它会给我这个:
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
<none> <none> 2b1cf54887a8 20 minutes ago 139.5 MB
<none> <none> 14e148a673c8 3 hours ago 204.4 MB
<none> <none> bf3d7d4f575d 13 days ago 273.9 MB
<none> <none> c3553dd60b1e 13 days ago 273.9 MB
mgs/my-site latest 268ffd69fb60 13 days ago 273.9 MB
miggom/mySite latest 268ffd69fb60 13 days ago 273.9 MB
my-site latest 268ffd69fb60 13 days ago 273.9 MB
mgsMySite latest 268ffd69fb60 13 days ago 273.9 MB
mgs_mySite latest 268ffd69fb60 13 days ago 273.9 MB
<none> <none> b055dfd3f223 13 days ago 273.9 MB
apache2 latest 826c4bc6368a 2 weeks ago 273.9 MB
<none> <none> 7aa770719eb1 2 weeks ago 273.9 MB
<none> <none> 1850570b7316 2 weeks ago 273.9 MB
<none> <none> 44943615dd35 2 weeks ago 273.9 MB
<none> <none> 994c3e50a608 2 weeks ago 273.9 MB
<none> <none> a97583e98230 2 weeks ago 273.9 MB
<none> <none> 635d880c0c38 2 weeks ago 273.9 MB
<none> <none> b8735e7272ef 2 weeks ago 224.3 MB
baselDaemon latest 4e892058b0b2 2 weeks ago 204.4 MB
ubuntu saucy 9f676bd305a4 4 weeks ago 178 MB
ubuntu 13.10 9f676bd305a4 4 weeks ago 178 MB
<none> <none> 1c7f181e78b9 4 weeks ago 0 B
ubuntu 13.04 eb601b8965b8 4 weeks ago 166.5 MB
ubuntu raring eb601b8965b8 4 weeks ago 166.5 MB
<none> <none> f323cf34fd77 4 weeks ago 0 B
ubuntu 12.10 5ac751e8d623 4 weeks ago 161 MB
ubuntu quantal 5ac751e8d623 4 weeks ago 161 MB
<none> <none> 321f7f4200f4 4 weeks ago 0 B
ubuntu 10.04 9cc9ea5ea540 4 weeks ago 180.8 MB
ubuntu lucid 9cc9ea5ea540 4 weeks ago 180.8 MB
ubuntu precise 9cd978db300e 4 weeks ago 204.4 MB
ubuntu 12.04 9cd978db300e 4 weeks ago 204.4 MB
ubuntu latest 9cd978db300e 4 weeks ago 204.4 MB
<none> <none> 6170bb7b0ad1 4 weeks ago 0 B
<none> <none> 7a4f87241845 5 weeks ago 0 B
<none> <none> 511136ea3c5a 8 months ago 0 B
learn/tutorial latest 8dbd9e392a96 10 months ago 128 MB
因此,问题是泊坞窗信息中显示的图片数量与泊坞窗图片中显示的图片数量不匹配。如果您还执行没有标记的docker图像,我不知道如何获得正确数量的图像,它与docker info中显示的图像数量不匹配
我不知道哪些类型的信息可以从码头信息中获取,因为在docker.io中只有一个文档示例。
提前谢谢
答案 0 :(得分:1)
这里的要点不是图像是否被标记。计算图像时请记下图像ID。具有相同ID的几个(带有不同标记的)图像计为一个图像,因为它们是相同的图像:)
如果我手动计算不同的ID,我会找到27。
答案 1 :(得分:0)
许多图像都是中间图像,当您想要重建Dockerfile时用于缓存。
默认情况下,当您运行docker images
时,它会隐藏这些中间图像,但如果您传递-a
参数,则会全部显示