我实验室里的某个人运行了一个"docker system prune“命令,因为他需要更多的空间来下载一个大型数据集。但是,在运行它之后,未使用的新图像会在大约一分钟后消失。必须有一个容器使用该图像使其持久化。我们想重新启动docker守护进程,但现在不能,因为重要的容器正在运行(例如,训练深度神经网络)。如何让docker镜像再次持久化?我们不确定这位同事是否运行了可能导致这种情况的其他命令。如果这是相关的,我们使用docker 18.09.6。
发布于 2020-02-08 01:50:52
来自docker system prune的docker文档-
Remove all unused containers, networks, images (both dangling and unreferenced), and optionally, volumes.
$ docker system prune
WARNING! This will remove:
- all stopped containers
- all networks not used by at least one container
- all dangling images
- all build cache如果添加了-a,-a选项将删除所有未使用的图像,而不仅仅是悬空的图像。因此,如果您希望保留这些图像,则应该避免使用-a选项。看起来确实使用了"-a“来删除未使用的图像。
https://stackoverflow.com/questions/60115190
复制相似问题