I got additional instructions on how to handle the following:
The details are:
1
The command to remove an image is:
docker rmi {image_name}Where
{image_name}is the name of the image you want to delete. You can also use the image ID to delete the image (e.g.,docker rmi {image_id}). This is what you will need to use to delete an image with a name of<none>.For example, Let’s say you have the following images:
REPOSITORY TAG IMAGE ID CREATED SIZE my-new-image latest c18f86ab8daa 12 seconds ago 393MB <none> <none> b1ee72ab84ae About a minute ago 393MB my-image latest f5a5f24881c3 2 minutes ago 393MBIt is possible that the
<none>image cannot be deleted because themy-new-imageis using some layers from it. What you need to do is:docker rmi my-new-image:latest docker rmi b1ee72ab84ae docker built -t my-new-image .What that does is remove
my-new-image:latestwhich is reusing layers from the<none>image. It then deletes the<none>image using it’s image IDb1ee72ab84ae. Finally it rebuildsmy-new-imagecreating all of the layers that are needed.Also check to make sure that you don’t have stopped containers that are still using the
<none>“untagged” image. Usedocker ps -ato see all image including ones that have exited. If so, usedocker rm {container_id}to remove the container and then try and remove the<none>image again.
What do you all think?