Docker 镜像随着时间的推移而消失 [英] Docker images disappearing over time

查看:125
本文介绍了Docker 镜像随着时间的推移而消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我加载了一些正在运行的 docker 图像

I loaded some docker images running

docker load --input <file>

然后我可以在执行时看到这些图像

I can then see these images when executing

docker image ls

一段时间后,图像开始消失.每隔几分钟,列出的图像就会越来越少.我还没有运行任何图像.导致此问题的原因是什么?

After a while images start disappearing. Every few minutes there are less and less images listed. I did not run any of images yet. What could be the cause of this issue?

这个问题是由 minikube VM 中的 docker 引起的.

This issue arises with docker inside minikube VM.

推荐答案

既然你提到了 Docker 守护进程在 minikube 虚拟机内运行,我假设您可能会遇到 K8s 垃圾收集机制,保持系统利用率适当的级别并通过调整特定阈值来减少未使用的容器(从图像构建)的数量.

Since you've mentioned that Docker daemon runs inside minikube VM, I assume that you might hit K8s Garbage collection mechanism, which keeps system utilization on appropriate level and reduce amount of unused containers(built from images) by adjusting the specific thresholds.

这些驱逐阈值 完全由 Kubelet k8s node agent,根据kubelet中传播的参数(flags)清理不确定的镜像和容器配置文件.

These eviction thresholds are fully managed by Kubelet k8s node agent, cleaning uncertain images and containers according to the parameters(flags) propagated in kubelet configuration file.

因此,我想您可以通过查看特定阈值来调查 K8s 驱逐行为,在 kubelet 配置文件中进行调整,该文件由 minikube 引导程序生成,位于以下路径 /var/lib/kubelet/config.yaml.

Therefore, I guess you can investigate K8s eviction behavior looking at the certain thresholds, adjusted in kubelet config file which is generated by minikube bootstrapper in the following path /var/lib/kubelet/config.yaml.

这篇关于Docker 镜像随着时间的推移而消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆