- 下载docker nginx镜像
docker pull nginx #或者
docker pull nginx:1.18.0
docker pull 后跟镜像名称,":"后是镜像版本
[root@localhost ~]# docker pull nginx
Using default tag: latest
latest: Pulling from library/nginx
8559a31e96f4: Pull complete
8d69e59170f7: Pull complete
3f9f1ec1d262: Pull complete
d1f5ff4f210d: Pull complete
1e22bfa8652e: Pull complete
Digest: sha256:21f32f6c08406306d822a0e6e8b7dc81f53f336570e852e25fbe1e3e3d0d0133
Status: Downloaded newer image for nginx:latest
docker.io/library/nginx:latest
latest 表示自动安装最新版本
- 查看镜像版本
[root@localhost ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx latest 2622e6cca7eb 13 days ago 132MB
REPOSITORY[nginx]: 镜像名称
TAG [latest]:镜像版本
IMAGE ID [2622e6cca7eb]:镜像id编号
CREATED [13 days ago]: