Using the command docker images
, you can list all images on your host:
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE scdockerdemo_php latest 155d80ea7642 4 minutes ago 265.3 MB scdockerdemo_node latest 6189bc65c3fe 8 minutes ago 861.4 MB php 5.6-apache fc50bce69ea0 3 days ago 481.3 MB node 4.1 fc81e574af43 3 days ago 641.1 MB
With docker images -f "tag=latest"
, you can filter for images with a certain tag.
How can I filter for a repository name? E.g. docker images -f "repository=scdockerdemo_*"
This command always return Invalid filter 'repository'
https://docs.docker.com/reference/commandline/images/
List images by name and tag. The docker images command takes an optional [REPOSITORY[:TAG]] argument that restricts the list to images that match the argument. If you specify REPOSITORY but no TAG , the docker images command lists all images in the given repository. The [REPOSITORY[:TAG]] value must be an “exact match” ...
Pull a repository with multiple images To pull all images from a repository, provide the -a (or --all-tags ) option when using docker pull .
To remove the image, you first need to list all the images to get the Image IDs, Image name and other details. By running simple command docker images -a or docker images . After that you make sure which image want to remove, to do that executing this simple command docker rmi <your-image-id> .
If you want to filter by repository name(eg: testImage), just use the following:
docker images testImage
When you have multiple images with same repository name but diffetent tags, you can specify tags on the repository name by using a ':'
( For example, testImage:<whatever tag>
)
Source: Docker images
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With