Docker怎么删除none镜像
Docker怎么删除none镜像
这篇文章主要介绍“Docker怎么删除none镜像”,在日常操作中,相信很多人在Docker怎么删除none镜像问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”Docker怎么删除none镜像”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!
删除none的镜像,要先删除镜像中的容器。要删除镜像中的容器,必须先停止容器。
$dockerimagesREPOSITORYTAGIMAGEIDCREATEDSIZE168b258ceea334secondsago460.6MBb2c5d34941c623minutesago588.7MBtankzhang/esv185fc66558c3713daysago352.1MBelasticsearchlatestd781cd4e32283weeksago352.1MBcentoslatest8140d0c643103weeksago192.6MBhello-worldlatest48b5124b27684monthsago1.84kBtankzhang/esv248b5124b27684monthsago1.84kB$dockerrmi$(dockerimages|grep"none"|awk'{print$3}')Errorresponsefromdaemon:conflict:unabletodeleteb2c5d34941c6(mustbeforced)-imageisbeingusedbystoppedcontainerad0032609294Errorresponsefromdaemon:conflict:unabletodelete168b258ceea3(mustbeforced)-imageisbeingusedbystoppedcontainer1b7067e19d6f
直接删除带none的镜像,直接报错了。提示先停止容器。
$dockerstop$(dockerps-a|grep"Exited"|awk'{print$1}')//停止容器1b7067e19d6fa840f345c4239d74eff1c4e417d361107a21dd51ead96da7ad003260929495e713ab1bdf$dockerrm$(dockerps-a|grep"Exited"|awk'{print$1}')//删除容器1b7067e19d6fa840f345c4239d74eff1c4e417d361107a21dd51ead96da7ad003260929495e713ab1bdf$dockerrmi$(dockerimages|grep"none"|awk'{print$3}')//删除镜像Deleted:sha256:168b258ceea3f5ee9d7f066e04c89c4858f0e337687f18b5939a78aea13ea6c8Deleted:sha256:d3984014bcbe856f569dcade31ce70aae8cc5ead3806e47ae08229467c9ed3caDeleted:sha256:b2c5d34941c646a1962d2acd9ff968708495a82916c33797f5fb3d94de403c6dDeleted:sha256:5a23f5ad9107bb1111f32d490982e2146cf0811c8b75c7a6cd67ca45fc2f50ddDeleted:sha256:392d616344b17b0bb7b8ad46cc9a8c6f5ab4be8bd59c3d5973016e8759a1668cDeleted:sha256:33fbf9c999e8beac51b184a0f2baeaf1a2b99b10c4cc1f654075af42779fb62eDeleted:sha256:b3535d64be668cd7e3389c4da224ae6e3aaedadff05ed24f428fc83e96c65a03Deleted:sha256:da47261567b38193ba4894e7c832d9eba78d9cc3a501101ebf5fd7304efef5b9Deleted:sha256:b81b2578fd4e803fac0bd416e606362ed14432370088eba8bf5c43a4fca8f7edDeleted:sha256:6f4b2f9fd5be471ac80c599c9616feaaf3952ce8a68d5d8c26645bfaff7aae4aDeleted:sha256:480e2b77d27aea6e128db8d3c400f37b74da1b365b0eb663022d7208a9694209
到此,关于“Docker怎么删除none镜像”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注恰卡编程网网站,小编会继续努力为大家带来更多实用的文章!
推荐阅读
-
jenkins(docker 最佳实践 小团队devops如何落地)
小团队devops如何落地?我司之前小团队java技术站CI/CD路线,基于阿里云自建整体原则:先测什么后生产出来,先边缘后核心具...
-
Zend Studio使用教程:在Docker容器中调试PHP Web应用(三)
-
「docker+gdb」调试 PHP 源码,看 strva
-
使用laradock创建laravel本地开发环境
-
Docker PHP 入门实践(一)
-
docker配置PHP本地开发环境「php+nginx+mysql」
-
如何在CentOS 7上安装和使用Docker Compose
-
docker中运行php文件
-
用 Laradock搭建本地 PHP 容器开发环境&宝塔Docker一键部署
-
从零开始学习Docker- PHP环境搭建(Windows环境)