root@ubuntu-3:~# docker image --help
Usage: docker image COMMAND
Manage images
Commands:
build Build an image from a Dockerfile
history Show the history of an image
import Import the contents from a tarball to create a filesystem image
inspect Display detailed information on one or more images
load Load an image from a tar archive or STDIN
ls List images
prune Remove unused images
pull Pull an image or a repository from a registry
push Push an image or a repository to a registry
rm Remove one or more images
save Save one or more images to a tar archive (streamed to STDOUT by default)
tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
查看当前本地的镜像
root@ubuntu-3:~# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx alpine cc44224bfe20 10 months ago 23.5MB
ubuntu 22.04 9d28ccdc1fc7 10 months ago 76.3MB
拉取镜像
root@ubuntu-3:~# docker pull ubuntu:22.04
22.04: Pulling from library/ubuntu
Digest: sha256:f154feaf13b51d16e2b4b5575d69abc808da40c4b80e3a5055aaa4bcc5099d5b
Status: Image is up to date for ubuntu:22.04
docker.io/library/ubuntu:22.04