如何从任何码头仓库中拉一张图像? [英] How to pull a single image from any docker repository?
问题描述
当我使用:
docker pull ubuntu
它下拉了大约8-10个不同版本的ubuntu。 / p>
如果有一个特定的图片被标记,可以使用--tag =(或-t)你想要的图像这个命令也有一个简写形式,它只使用图像名称和标签之间的一个冒号。
所以如果你想要标记为量子的ubuntu版本,您可以使用:
docker pull ubuntu:quantal
较长的表单将是:
docker pull --tag =量子ubuntu
docker pull --t quantal ubuntu
这仍然会拖动历史层用于构建最终的图像,但是将比ubuntu的所有图层更小的子集。
[更新以包含本文从下面的简写。谢谢!]
The docker repositories contains multiple images. Is it possible to just pull the specific image from Repository.
When I use:
docker pull ubuntu
It pulls down around 8-10 different versions of ubuntu.
If there's a specific image that's tagged, you could use the --tag= (or -t) operator to pull the specific image you're looking for. There's a shorthand form for the command as well, which uses just a colon between the image name and the tag.
So if you want the version of ubuntu that's tagged as quantal, you could use:
docker pull ubuntu:quantal
The longer forms would be:
docker pull --tag="quantal" ubuntu
docker pull --t quantal ubuntu
This will still pull the historical layers used to build the final image, but will be a smaller subset than all of the layers for ubuntu.
[Updated to include Ben's note on shorthand from below. Thanks!]
这篇关于如何从任何码头仓库中拉一张图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!