博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
docker删除映像_从命令行使用Docker映像
阅读量:2508 次
发布时间:2019-05-11

本文共 1460 字,大约阅读时间需要 4 分钟。

docker删除映像

You can list all the images you have downloaded or installed using the

您可以使用列出所有已下载或安装的映像

docker images -a

command:

命令:

You can remove an image with docker rmi command, passing the name of the image you want to remove. This will remove the image.

您可以使用docker rmi命令删除图像,并传递要删除的图像的名称。 这将删除图像。

Sometimes when testing and developing, some images become dangling, which means untagged images. They can always be safely removed to free disk space.

有时在测试和开发时,有些图像会悬空,这意味着未标记的图像。 始终可以安全地删除它们以释放磁盘空间。

Running docker images -f dangling=true will list them:

运行docker images -f dangling=true将列出它们:

And you can clear them with docker rmi $(docker images -f dangling=true -q). This command will only eliminate dangling images used in containers, even if not currently running.

您可以使用docker rmi $(docker images -f dangling=true -q)清除它们。 即使当前未运行,此命令也将仅消除容器中使用的悬挂图像。

docker system prune -a, which is also a commonly used way to remove images, will also remove images not referenced by any container, which might remove images you might want to keep, even just to rollback to previous versions of an image.

docker system prune -a也是一种删除映像的常用方法,它还会删除任何容器未引用的映像,这可能会删除您可能想要保留的映像,甚至只是回滚到映像的先前版本。

You can also remove all images using docker rmi $(docker images -a -q) if you want to clean everything, which might be nice during your first tests and experiments with Docker.

如果您想清理所有内容,也可以使用docker rmi $(docker images -a -q)删除所有图像,这在您进行Docker的第一次测试和实验时可能会很好。

翻译自:

docker删除映像

转载地址:http://yomgb.baihongyu.com/

你可能感兴趣的文章
iOS6新特征:UICollectionView介绍
查看>>
分享一个基于Bootstrap的 ACE框架 入门(MVC+EF)
查看>>
增量关联规则挖掘—FUP算法
查看>>
spring相关—AOP编程—切入点、连接点
查看>>
animation_Frame动画图片轮播
查看>>
BZOJ 4195 - 离散化 + 并查集
查看>>
Oracle常用数据类型
查看>>
信息安全技术 作业5
查看>>
Java关键字final、static使用总结
查看>>
python文件_批量改名
查看>>
暑假集训(3)第一弹 -----还是畅通工程(hdu1233)
查看>>
php集成工具
查看>>
uestc 1855, dfs, 模拟
查看>>
Word Ladder II
查看>>
Binary Tree Level Order Traversal
查看>>
30+ Excellent Windows Phone 7 Development Tutorials
查看>>
3. Longest Substring Without Repeating Characters
查看>>
(带权并查集) bzoj 1202
查看>>
(差分约束系统) poj 1201
查看>>
当下的互联网科技巨头们
查看>>