docker pull 和 docker image pull 命令之间有什么区别?

huangapple go评论51阅读模式
英文:

What is the difference between docker pull and docker image pull commands?

问题

截至目前,我正在学习Docker。这个参考链接提到了从Docker注册表拉取镜像的两种方式。有人能简单解释一下吗?

这是否意味着如果我们使用docker image pull命令,我们无法获取已拉取镜像的更新?

英文:

As of now, I am learning Docker. This reference has mentioned two ways of pulling an image from the Docker registry. Can anyone explain this in simple terms?

Does this mean that we cannot get updates on a pulled image if we use docker image pull command?

答案1

得分: 3

它们是相同的命令。从您提供的文档中可知:

要下载特定的镜像,或一组镜像(即一个仓库),请使用 docker image pull(或 docker pull 的缩写)。

还有许多类似的“缩写命令”,比如:

  • docker push 对应于 docker image push
  • docker run 对应于 docker container run
  • ...
英文:

They are the same command. From the documentation you linked:
>To download a particular image, or set of images (i.e., a repository), use docker image pull (or the docker pull shorthand).

There are many "shortand commands" like:

  • docker push for docker image push
  • docker run for docker container run
  • ...

答案2

得分: 1

> docker pulldocker image pull 命令有什么区别?

没有区别。

> 有人能简单解释一下吗?

它们是相同的。

> 这是否意味着如果我们使用 docker image pull 命令,我们无法获取已拉取的镜像的更新?

不是这样的。

另请参阅 https://forums.docker.com/t/docker-pull-imagename-vs-docker-image-pull-imagename/59283

英文:

> What is the difference between docker pull and docker image pull commands?

None.

> Can anyone explain this in simple terms?

They are the same.

> Does this mean that we cannot get updates on a pulled image if we use docker image pull command?

No.

Also https://forums.docker.com/t/docker-pull-imagename-vs-docker-image-pull-imagename/59283

huangapple
  • 本文由 发表于 2023年2月16日 16:07:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/75469375.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定