How can I delete Docker images by tag, preferably with wildcarding?

前端 未结 2 1621
北海茫月
北海茫月 2020-12-23 00:26

I have some automated processes that spew a bunch of Docker images tagged with meaningful labels. The labels follow a structured pattern.

Is there a way to find and

2条回答
  •  醉梦人生
    2020-12-23 01:21

    Fun with bash:

    docker rmi $(docker images | grep stuff_ | tr -s ' ' | cut -d ' ' -f 3)
    

提交回复
热议问题