This article shows you how to determine the size of a Docker image that is hosted on Docker Hub or a Docker image that was pulled to your local system.
Table of Contents
Docker Hub’s Images
Go to the page of the image you want to know the size, then select the Tags tab. Now you can see the size corresponding to each tag on the right-hand side, as shown below:
Pulled Images
Make sure Docker is running on your system, then execute the following command:
docker image ls
Or:
docker images
And you will get a result like this one (just focus on the SIZE column):
In case you want to go further and Inspect the layers of an image, just perform the command below:
docker history <image name or ID>
Example:
docker history node:latest
Output:
Conclusion
You’ve learned how to check the size of a Docker image. If you’d like to explore more new and exciting things about this awesome technology, take a look at the following articles:
- Docker: How to List Running and Stopped Containers
- Deleting unnecessary Images and Containers in Docker
- Installing Docker on Ubuntu 21.04, 21.10, and 20.04
- React App Exits Immediately with Docker Run Command
- Limit resources consumed by Docker Desktop
- How to enable Kubernetes in Docker Desktop
You can also check out our Docker topic page for the latest tutorials, examples, tips, and tricks.