🎓 Top 15 Udemy Courses (80-90% Discount): My Udemy Courses - Ramesh Fadatare — All my Udemy courses are real-time and project oriented courses.
▶️ Subscribe to My YouTube Channel (178K+ subscribers): Java Guides on YouTube
▶️ For AI, ChatGPT, Web, Tech, and Generative AI, subscribe to another channel: Ramesh Fadatare on YouTube
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 imagesOrdocker image lsFiltering by Image Name:
To list images from a specific repository, specify its name:
docker images nginxOnly Showing Image IDs:
This is useful if you're scripting or need to quickly grab IDs for removal:
docker images -qFilter 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
My Top and Bestseller Udemy Courses. The sale is going on with a 70 - 80% discount. The discount coupon has been added to each course below:
Build REST APIs with Spring Boot 4, Spring Security 7, and JWT
[NEW] Learn Apache Maven with IntelliJ IDEA and Java 25
ChatGPT + Generative AI + Prompt Engineering for Beginners
Spring 7 and Spring Boot 4 for Beginners (Includes 8 Projects)
Available in Udemy for Business
Building Real-Time REST APIs with Spring Boot - Blog App
Available in Udemy for Business
Building Microservices with Spring Boot and Spring Cloud
Available in Udemy for Business
Java Full-Stack Developer Course with Spring Boot and React JS
Available in Udemy for Business
Build 5 Spring Boot Projects with Java: Line-by-Line Coding
Testing Spring Boot Application with JUnit and Mockito
Available in Udemy for Business
Spring Boot Thymeleaf Real-Time Web Application - Blog App
Available in Udemy for Business
Master Spring Data JPA with Hibernate
Available in Udemy for Business
Spring Boot + Apache Kafka Course - The Practical Guide
Available in Udemy for Business
Comments
Post a Comment
Leave Comment