• Docker 技巧:删除 Docker 所有镜像


    删除所有未运行 Docker 容器

    docker rm $(docker ps -a -q)

    删除所有 Docker 镜像

    删除所有未打 tag 的镜像

    docker rmi $(docker images -q | awk '/^<none>/ { print $3 }')

    删除所有镜像

    docker rmi $(docker images -q)

    根据格式删除所有镜像

    docker rm $(docker ps -qf status=exited)


    实际示例:

    [root@master01 ~]# docker rmi $(docker images -q)
    Deleted: sha256:51482802dfa3c539a9fb6eb94d9707a2beb37060660dc85024f34cdb1e3270f1
    Deleted: sha256:b202d6356beee8daa08cc0eb1f2c600e0f8a925d6123ed4dafd7181eea5be7b2
    Deleted: sha256:690ab1b03b8fd1b753bf99c05f9d0eb35b31c2cd1b0933c6ca920340afba1510
    Deleted: sha256:7b198487618230e657b6105678da7bf4ae841543a0e6baa8badced883a3e967b
    Untagged: cargo.caicloudprivatetest.com/zhiyi-system-test_devops/fashionbi-tomcat-test:latest
    Untagged: cargo.caicloudprivatetest.com/zhiyi-system-test_devops/fashionbi-tomcat-test@sha256:133ccff132298a87ed264065bd4a7f2f77f7aca4e98a3279b4602a866c1b173c
    Deleted: sha256:c667469af1f4b230cb433daab1f6725c341da1c85fd33240cf1cf2c51a93e86
    
    
    [root@master01 ~]# df -h
    Filesystem               Size  Used Avail Use% Mounted on
    /dev/mapper/centos-root   17G   11G  6.7G  61% /
    

      

     
  • 相关阅读:
    C open fopen read fread
    图像混合模式算法
    高级API和低级API
    strcpy_s与strcpy
    IsPowerOfTwo
    透明度算法
    POJ 2240(bellman_ford)
    POJ 1797(dijkstra)
    【转载】POJ 图论题目列表
    POJ 1502(Floyd)
  • 原文地址:https://www.cnblogs.com/weifeng1463/p/10108261.html
Copyright © 2020-2023  润新知