Docker List Images

In this quick guide, we will see how to display a list of all the Docker images on your system.

Check out all Docker tutorials and guides: Docker Tutorials and Guides

The docker images Command 

The primary command to list Docker images is:

docker images [OPTIONS] [REPOSITORY[:TAG]]

Running docker images without any arguments will display a list of all the images on your system. 

The information provided includes:

REPOSITORY: Name of the image. 

TAG: Version or variant of the image.

IMAGE ID: A unique identifier for each image. 

CREATED: Age of the image. 

SIZE: Disk space the image occupies.

Practical Examples 

Listing All Docker Images: 

Run the following command to display a list of all the images on your system:

docker images
Or
docker image ls

Filtering by Image Name: 

To list images from a specific repository, specify its name:

docker images nginx

Only Showing Image IDs: 

This is useful if you're scripting or need to quickly grab IDs for removal:

docker images -q

Filter Images by Creation Time: 

To view images created since a specific image:

docker images -f "since=nginx:latest"

Why would you want to list Docker images? 

Cleanup: Over time, as you work with Docker, you may accumulate a large number of unused or unnecessary images. By listing them, you can identify which ones to remove. 

Verification: After pulling a new image or building an image from a Dockerfile, it's a good practice to list images to verify that the operation succeeded. 

Management: Especially in environments where multiple applications or services are containerized, keeping track of available images helps in managing deployments and updates.

Remember, the docker images command only shows images on your local system. If you're using a remote Docker repository or a service like Docker Hub, you'd need other mechanisms or commands to list images stored there.

Related Docker Image Management Guides

Comments