200-使用镜像-获取镜像

命令语法格式

docker pull [选型] [Docker Registry 地址[:端口]/]仓库名[:标签]

docker pull --help 查看选项

docker pull 命令一般情况下不需要选项

[root@localhost ~]# docker pull --help

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

Pull an image or a repository from a registry

Options:
  -a, --all-tags                Download all tagged images in the repository
      --disable-content-trust   Skip image verification (default true)

示例:拉取 Ubuntu:16.04 镜像

docker pull ubuntu:16.04

注意

  1. Docker 镜像仓库地址:地址的格式一般是 <域名/IP>[:端口]。默认地址是 Docker Hub 的地址;
  2. 仓库名:仓库名是两段式的,即 /<软件名>。对于 Docker Hub,如果不给出用户名,则默认为 library,也就是官方镜像;

猜你喜欢

转载自blog.csdn.net/dejunyang/article/details/93201367