2017-10-18 60 views
0

我创建并运行Docker容器。Docker镜像仅以ID显示

docker image ls显示以下

REPOSITORY      TAG     IMAGE ID   CREATED    SIZE 
model_cnn3_4      trained_linux   c29d652864b3  About an hour ago 3.37GB 
<none>       <none>     72fde1eacaff  4 hours ago   3.37GB 
<none>       <none>     b1c12b6f4603  21 hours ago  3.37GB 
<none>       <none>     4815f2e0588e  22 hours ago  3.37GB 
<none>       <none>     b05ec80bf7ae  24 hours ago  3.37GB 
model_cnn3_6      latest     c266efd55148  27 hours ago  3.35GB 
model_cnn3_4      latest     6c6a9e2d0e89  27 hours ago  3.35GB 
<none>       <none>     9f521f6d9829  43 hours ago  3.35GB 
tensorflow-py3-gpu-keras   latest     172a48e49bf4  43 hours ago  3.35GB 
tensorflow/tensorflow   v3      1ec7a5c316f4  4 days ago   1.67GB 
anaconda3-keras-tensorflow-gpu latest     239c5ba65421  4 days ago   4.5GB 
continuumio/anaconda3   latest     1cdde60f40a3  2 weeks ago   3.04GB 
tensorflow/tensorflow   latest-devel-gpu-py3 83d83027cb5a  2 months ago  3.99GB 
tensorflow/tensorflow   latest     1bb38d61d261  2 months ago  1.21GB 
tensorflow/tensorflow   latest-gpu-py3   ae2207c21bc1  2 months ago  3.29GB 

就与<none>库和标记这些图片来自哪里?

如果我运行命令docker run <image ID> ls -la,我可以看到这些图像看起来像是早些时候运行并停止的容器的快照。

但究竟是什么造就了他们?

更新docker run image_tag不会创建新图像,对不对?

+0

您是否在该主机上构建任何Docker映像? – Sergiu

+0

是的,我已经建立了一些图像。其中一个正在运行(NN培训) – wl2776

回答

1

这只是默认的Docker行为。

图片您所看到的只是构建Docker镜像时使用的图层。

换句话说,当你建立一个图像时,很少的图层被创建和存储。

要了解更多关于它blog post是一个很好的阅读。

编辑

没有,搬运工运行/启动不创造新的图像,只需启动你指定的图像。但是,如果映像无法位于硬盘上,Docker会继续为您提供该映像。

+1

@ wl2776我编辑了我的帖子,为了回答您的最后一个问题 – Sergiu

+0

我希望您能回顾一下我的新问题:https://stackoverflow.com/q/46811493/704329 – wl2776

相关问题