{"id":5482,"date":"2019-07-30T18:04:15","date_gmt":"2019-07-30T23:04:15","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=5482"},"modified":"2019-07-30T10:09:05","modified_gmt":"2019-07-30T15:09:05","slug":"cleaning-up-unused-docker-images","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=5482","title":{"rendered":"Cleaning Up Unused Docker Images"},"content":{"rendered":"<p>I&#8217;ve been using Docker for quite some time, but never had unused container images. This is partially because I installed a new hard drive and started from a blank slate, but also because I haven&#8217;t needed to use many different images to build my containers.<\/p>\n<p>I&#8217;ve changed jobs recently and wanted to set up a container to mirror our web server. Which meant trying to get a CentOS 6.8 container going. Except there <em>isn&#8217;t<\/em> one from Cent anymore. And I don&#8217;t exactly trust random-dude-from-the-Internet&#8217;s OS. Download it and poke around without running it, sure &#8230; but that&#8217;s not a platform on which I can do my development.<\/p>\n<p>And that means I&#8217;ve got a few images that I do not need. To view the list of images, use &#8220;docker images -a&#8221;<\/p>\n<p>&nbsp;<\/p>\n<p>D:\\docker&gt;<strong>docker images -a<\/strong><br \/>\nREPOSITORY TAG IMAGE ID CREATED SIZE<br \/>\nopenhab\/openhab snapshot 8a4749c86ff3 4 weeks ago 527MB<br \/>\ndocker4w\/nsenter-dockerd latest 2f1c802f322f 9 months ago 187kB<br \/>\ncentos\/php-56-centos7 latest 92ed8b3a7cb4 15 months ago 617MB<br \/>\n&#8230;<br \/>\n13652604711\/centos6.8-ssh latest 59ab169b5158 2 years ago 289MB<\/p>\n<p>Then use &#8220;docker rmi <em>imagename<\/em>&#8221; to remove any unnecessary ones.<\/p>\n<p>D:\\docker&gt;<strong>docker rmi centos\/php-56-centos7<\/strong><br \/>\nUntagged: centos\/php-56-centos7:latest<br \/>\nUntagged: centos\/php-56-centos7@sha256:f3c95020fa870fcefa7d1440d07a2b947834b87bdaf000588e84ef4a599c7546<br \/>\nDeleted: sha256:92ed8b3a7cb4d56d3a1c58386d966f22736010a292a81a72dddbc4ffc7cae3fd<br \/>\nDeleted: sha256:bdcb229c59ed69d26750cd0d24362670e1fa2ae9be6ef19aa3e7c5571a4a8503<br \/>\nDeleted: sha256:90eb7fca62f6c0febd9cc21544269029ff231f39f16054ba6b0ca93ec1037d97<br \/>\nDeleted: sha256:cdcf05e149fc6cb2801f7f93dce3acb54465fe6c46a16dd6135aa74d79bedffa<br \/>\nDeleted: sha256:139498a5907a4d17cf07b1400bdbdb4db5e9f1ac4e3985aac2b374eaa712d5fb<br \/>\nDeleted: sha256:5f0780b14e43db37e84162e0045657203ac1e9fb531cc3e879fa464eda013e79<br \/>\nDeleted: sha256:7e117241875497974bb56f09e6340e142a9acaa11af76917afab345acc25b5c1<br \/>\nDeleted: sha256:4b170488c295918f4d7618c2cd0b9b428d55ec952dd6a715593e3af34e538d94<br \/>\nDeleted: sha256:1e889f7360c52d1b20f93335382290445e4f257f08ccef01694837572842e95f<br \/>\nDeleted: sha256:43e653f84b79ba52711b0f726ff5a7fd1162ae9df4be76ca1de8370b8bbf9bb0<\/p>\n<p>D:\\docker&gt;<strong>docker rmi 13652604711\/centos6.8-ssh<\/strong><br \/>\nUntagged: 13652604711\/centos6.8-ssh:latest<br \/>\nUntagged: 13652604711\/centos6.8-ssh@sha256:41bbe66ac18f199efac325d0d4bcb5d0390ec501ca82d6d1ce223df8a050be3a<br \/>\nDeleted: sha256:59ab169b5158a172079e2a89442936bc49292ea951f2eb9acb688a0ee34f95e1<br \/>\nDeleted: sha256:12d850520660ec9de87e84735a7067e663db282245502820f09dae5c937a93d2<br \/>\nDeleted: sha256:6b5c6954e3d511934786375730a068d0f013dcc99356a341a8c5d268a3b1cf3d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been using Docker for quite some time, but never had unused container images. This is partially because I installed a new hard drive and started from a blank slate, but also because I haven&#8217;t needed to use many different images to build my containers. I&#8217;ve changed jobs recently and wanted to set up a &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[623,30],"tags":[231,396],"class_list":["post-5482","post","type-post","status-publish","format-standard","hentry","category-containerized-development-and-deployment","category-system-administration","tag-docker","tag-system-administration"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/5482","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5482"}],"version-history":[{"count":2,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/5482\/revisions"}],"predecessor-version":[{"id":5484,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/5482\/revisions\/5484"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}