docker-image
Manage Docker images (build, tag, remove)
TLDR
List local Docker images
Delete unused local Docker images
Delete all unused images (not just those without a tag)
Show the history of a local Docker image
SYNOPSIS
docker image [OPTIONS] COMMAND [ARGS]...
PARAMETERS
--debug
Enable debug mode
--help
Print usage
-v, --version
Print version information
DESCRIPTION
The docker image command is a key part of the Docker CLI for managing local Docker images, which are lightweight, executable packages containing application code, runtime, libraries, and dependencies. It supports essential operations like building images from Dockerfiles, listing images with details, pulling from remote registries (e.g., Docker Hub), pushing to registries, tagging for organization, inspecting metadata and layers, viewing build history, saving to tar archives, loading from archives, importing tarballs, pruning unused images to reclaim disk space, and removing images.
This command streamlines image lifecycle management in development, testing, and deployment workflows. For example, developers build images locally, tag them for versioning, and push to repositories for CI/CD pipelines. It integrates with other Docker commands like docker container and docker buildx for multi-platform builds. Usage requires a Docker daemon, and output can be formatted with --format flags in subcommands for scripting.
CAVEATS
Requires Docker daemon running with sufficient privileges. Prune and rm may need sudo. Large images consume significant disk space; use docker system df to monitor.
SUBCOMMANDS
build - Build from Dockerfile
history - Show image layers history
import - Import from tarball
inspect - Detailed image info
load - Load from tar archive
ls - List images
prune - Remove unused
pull - Download from registry
push - Upload to registry
rm - Delete images
save - Save to tar
tag - Tag images
HISTORY
Introduced in Docker 1.13 (2017) as part of CLI restructuring for namespacing, deprecating flat commands like docker images in favor of docker image ls. Evolved with Docker Engine releases, adding features like multi-arch support in 17.05 and build enhancements in 18.09.
SEE ALSO
docker(1), docker-container(1), docker-system(1), podman-image(1)


