We live in an era where storage is becoming cheaper everyday. We can just send everything to the cloud and pay almost nothing.
我们生活的时代每天都在变得越来越便宜。 我们可以将所有内容发送到云中,而几乎不支付任何费用。
So why would we need to worry about deleting Docker images?
那么,为什么我们要担心删除Docker映像呢?
First of all, there are still some mission critical workloads that can't be moved to the cloud, especially those in heavily regulated industries like law or healthcare.But to better answer that question, I would say that we as developers often find ourselves out of space on our local machines.
首先,仍然有一些关键任务工作负载无法转移到云中,特别是在法律或医疗保健等受严格监管的行业中。但是为了更好地回答这个问题,我想说我们作为开发人员经常会发现自己我们本地机器上的空间。
Let's do a quick analysis of this StackOverflow public dataset to explore that further:
让我们对这个StackOverflow公开数据集进行快速分析,以进一步探索它:
SELECT tag,
title,
answer_count,
favorite_count,
score,
view_count VIEWS
FROM
(SELECT title,
answer_count,
favorite_count,
view_count,
score,
SPLIT(tags, '|') tags
FROM `bigquery-public-data.stackoverflow.posts_questions`
posts_questions), UNNEST(tags) tag
WHERE tag = 'docker'
AND title LIKE '%space left%'
ORDER BY VIEWS DESC
Query Results:
查询结果:
So it does't happen just with me, right? Look at how many views we have on those StackOverflow posts. If you are wondering, the number is 465687 views for posts matching the search query.
所以这不仅仅发生在我身上,对吗? 看看我们对那些StackOverflow帖子有多少意见。 如果您想知道,与搜索查询匹配的帖子的查看次数为465687 。
Luckily for us, today we are going to see some easy-to-use examples on how to delete our dangling and unused docker images to help ourselves out.
对我们来说幸运的是,今天我们将看到一些易于使用的示例,这些示例说明了如何删除悬空和未使用的docker映像以帮助自己。
什么是悬空的和未使用的Docker映像? (What are dangling and unused Docker images?)
What is the difference between dangling and unused images, you mi