Solve image is referenced in multiple repositories when deleting images

1. View image docker images

rt@123:~# docker images
REPOSITORY                                  TAG                 IMAGE ID            CREATED             SIZE
192.168.0.1/jii/jenkins                    1.0.1              3391ef1391f6        18 hours ago        206 MB
192.168.0.1/you/tom                        1.0.8              f8ab12e03d53        22 hours ago        276 MB
192.168.0.1/you/tom                        1.0.9              f8ab12e03d53        22 hours ago        276 MB

2, delete the mirror, will report an error

rt@123:~# docker rmi f8ab12e03d53
Error response from daemon: conflict: unable to delete f8ab12e03d53 (must be forced) - image is referenced in multiple repositories

After careful observation, I found that the mirror id f8ab12e03d53 points to two repositories, so it cannot be deleted

3. When deleting, you can use repository and tag to delete

rt@123:~# docker rmi 192.168.0.1/you/tom:1.0.8
Untagged:192.168.0.1/you/tom:1.0.8
 
 

4. Check the mirror again, 1.0.8 has been deleted.

rt@123:~# docker images
REPOSITORY                                  TAG                 IMAGE ID            CREATED             SIZE
192.168.0.1/jii/jenkins                    1.0.1              3391ef1391f6        18 hours ago        206 MB
192.168.0.1/you/tom 1.0.9 f8ab12e03d53 22 hours ago 276 MB

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324748058&siteId=291194637