When I run the docker-compose build
command to rebuild an image in Docker because I had changed something in Dockerfile, sometimes I get \"none\" image tags. Ho
Below are some parts from What are Docker
The Good
: These are intermediate images and can be seen using
docker images -a
. They don't result into a disk space problem but it is definitely a screen real estate problem. Since all theseimages can be quite confusing as what they signify.
: The Bad
: These images are the dangling ones, which can cause disk space problems. These
images are being listed as part of
: docker images
and need to be pruned.(a dangling file system layer in Docker is something that is unused and is not being referenced by any images. Hence we need a mechanism for Docker to clear these dangling images)
if your case has to do with dangling
images, it's ok to remove them with:
docker rmi $(docker images -f "dangling=true" -q)
There is also the option of docker image prune
but the client and daemon API must both be at least v1.25
to use this command.
if your case has to do with intermediate
images, it's ok to keep them, other images are pointing references to them.
Related documentation: