Linux command
docker-image 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
List images
docker image ls
Pull an image
docker image pull [image]:[tag]
Remove an image
docker image rm [image]
Build an image
docker image build -t [name] [path]
Inspect image details
docker image inspect [image]
Show image history
docker image history [image]
Remove unused images
docker image prune
说明
docker image manages Docker images, which are read-only templates used to create containers. Images contain the application code, runtime, libraries, environment variables, and configuration files needed to run software in an isolated environment. Docker images are built in layers, with each instruction in a Dockerfile creating a new layer. This layering system enables efficient storage through layer sharing between images and faster builds through caching. Images are identified by repository name, optional tag (defaulting to "latest"), and a unique SHA256 digest. The docker image command group provides comprehensive image lifecycle management, from pulling images from registries, building custom images via Dockerfile, tagging for organization, to cleaning up unused images that consume disk space.
FAQ
What is the docker-image command used for?
docker image manages Docker images, which are read-only templates used to create containers. Images contain the application code, runtime, libraries, environment variables, and configuration files needed to run software in an isolated environment. Docker images are built in layers, with each instruction in a Dockerfile creating a new layer. This layering system enables efficient storage through layer sharing between images and faster builds through caching. Images are identified by repository name, optional tag (defaulting to "latest"), and a unique SHA256 digest. The docker image command group provides comprehensive image lifecycle management, from pulling images from registries, building custom images via Dockerfile, tagging for organization, to cleaning up unused images that consume disk space.
How do I run a basic docker-image example?
Run `docker image ls` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
Where can I find more docker-image examples?
This page includes 7 examples for docker-image, plus related commands for nearby Linux tasks.