Docker 图片只显示 ID
Docker images appear only with IDs
我创建 运行 docker 个容器。
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
不会创建新图像吧?
这只是默认的 Docker 行为。
您看到的图像只是构建Docker图像时使用的图层。
换句话说,当您构建图像时,会创建和存储几个层。
要了解更多信息,这篇 blog post 是一本好书。
编辑:
不,docker 运行 /start 不会创建新图像,只会启动您指定的图像。但是,如果无法在您的硬盘上找到图像,Docker 将继续为您提取该图像。
我创建 运行 docker 个容器。
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
不会创建新图像吧?
这只是默认的 Docker 行为。
您看到的图像只是构建Docker图像时使用的图层。
换句话说,当您构建图像时,会创建和存储几个层。
要了解更多信息,这篇 blog post 是一本好书。
编辑:
不,docker 运行 /start 不会创建新图像,只会启动您指定的图像。但是,如果无法在您的硬盘上找到图像,Docker 将继续为您提取该图像。