pull 命令用于从仓库中拉取镜像到本地。
默认情况下,[[Docker]] 会从 Docker Hub 拉取镜像,也可以从私有仓库或者指定平台镜像拉取。
使用
语法:docker pull <镜像名称>:<标签>
# 拉取最新版本docker pull python
# 拉取指定版本docker pull python:3.12
# 拉取多个镜像docker pull python:3.12 redis:latest
# 从私有仓库拉取镜像docker pull registry.example.com/myapp:latest
# 指定平台镜像docker pull --platform linux/amd64 python:3.12标签说明
latest:最新版本。stable:稳定版本。edge:开发版本。rc:候选版本。alpine:Alpine 版本。slim:精简版本。full:完整版本。