Docker命令-pull

命令

docker pull

描述

Pull an image or a repository from a registry
拉取镜像

用法

1
docker pull [OPTIONS] NAME[:TAG|@DIGEST]

选项

1
2
3
4
5
Options:
--all-tags , -a 下载指定镜像的所有tag版本
--disable-content-trust 跳过镜像验证,默认为true
--platform Set platform if server is multi-platform capable
--quiet , -q 静默模式

注意

示例

1
2
3
4
5
6
7
8
# 如果没有指定tag则默认为:latest,如果没有指定仓库地址,则默认从hub.docker.com搜索并下载
$ docker pull debian
$ docker pull debian:jessie
$ docker pull ubuntu:20.04
$ docker pull ubuntu@sha256:82becede498899ec668628e7cb0ad87b6e1c371cb8a1e597d83a47fac21d6af3
# 指定私有镜像仓库
$ docker pull myregistry.local:5000/testing/test-image
$ docker pull --all-tags fedora