docker build 即使失败了,也会生成镜像的,此时我们可以使用
来查找出所有的镜像,构建失败的镜像 REPOSITORY 和 TAG 都是 <none>,而且我们也可以通过时间来判断。
REPOSITORY         TAG         IMAGE ID       CREATED         SIZE powersee/siyuan    latest      8664365030da   4 hours ago     202MB siyuan             2.10.6      94877dcb3823   5 hours ago     201MB <none>             <none>      bf5c2d0d522c   5 hours ago     3GB <none>             <none>      c26fddb8b7ed   5 hours ago     1.93GB <none>             <none>      4f76c8d24d52   6 hours ago     865MB <none>             <none>      601859a2537a   6 hours ago     1.93GB siyuan-ce          2.10.6      10ce4886f886   8 hours ago     202MB <none>             <none>      253c841913eb   8 hours ago     3.03GB <none>             <none>      5fbb7e469e64   8 hours ago     1.93GB <none>             <none>      6b3c0b42b275   15 hours ago    865MB <none>             <none>      493bc3f0c9b5   15 hours ago    1.93GB
   | 
 
要删除的话使用 docker rmi 加上 IMAGE ID
而且支持同时删除多个
docker rmi c26fddb8b7ed 4f76c8d24d52 601859a2537a
   |