Because the attempt to use the new image of the original image to delete, being given as follows:
Meaning before you remove a mirror, first delete the corresponding docker. Because the image is corresponding container references, so image deletion failed.
Show the status of all containers docker ps -a / docker container ls -a
Then clean up all the final state of the container docker container prune
Then remove the mirror
Tips can also be a plus -f forcibly remove the mirror.
Incidentally, docker command:
1.docker RM <vessel or container ID name>
2.docker STOP <vessel or container ID name>
The idea: how to remove all the containers 1; 2 how to remove all containers Mirror, mirror 3 when you create will have a lot of middle mirror, this part of the mirror is removed with it...? none Mirror?
Docker RM 1. $ (Docker PS -q) can remove all containers
Here docker ps commands include:
1) -a list all containers
2) -l lists the newly created container
3) -n = 2 lists the two vessels recently created
4) -q lists only the container ID
5) - s display size of the container
so docker ps -aq corresponding to list all containers ID, and then they docker rm
But note that if the container is running can not be deleted, you need to stop:
docker stop $(docker ps -aq)
2. Remove the mirror is also true
d Ocker rmi $ (Docker PS -aq) or docker image rm option (id, name ....)
3. If you want to remove the tag did not play none Mirror:
Docker rmi $(docker images -a|grep none|awk '{print $3}')
It can also be written as:
docker ps -a | grep none} awk '{print $ 1}' | xargs docker rmi
by xagrs arguments passed
some what would produce none of the mirror?
1) Create a failure in image creation process, will result in invalid none Mirror
2) pull the mirror. Vertical parent-child relationship mirrored
3) use dockerfile file to create a mirror, regenerate new image name is assigned to the latter, in front of the mirror name to none