V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
yongliu
V2EX  ›  Docker

大家用 docker 部署时怎么处理旧的 image 啊?

  •  
  •   yongliu ·
    liu7yong · 2021-07-30 10:02:18 +08:00 · 1764 次点击
    这是一个创建于 998 天前的主题,其中的信息可能已经有所发展或是发生改变。

    公司没有专门的运维人员,选择了用 docker 作为日常的部署,运行一段时间后就会发现服务器上和 registry 中留下了一堆没用的 image,大家一般是怎么维护这些 image 的,定期清理吗?

    4 条回复    2021-07-30 11:26:43 +08:00
    touchwithe
        1
    touchwithe  
       2021-07-30 10:03:58 +08:00 via iPhone   ❤️ 1
    docker prune image
    3dwelcome
        2
    3dwelcome  
       2021-07-30 10:05:25 +08:00
    留着除了占硬盘,又没别的用。

    当然服务器通常硬盘大,可能也无所谓。
    tyit
        3
    tyit  
       2021-07-30 10:09:59 +08:00
    docker prune image -a -f
    akuo
        4
    akuo  
       2021-07-30 11:26:43 +08:00
    registry 的参数居多,好像有一个是自动清理的参数,百度下
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1138 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 22:49 · PVG 06:49 · LAX 15:49 · JFK 18:49
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.