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

前端 未结 1 1748
执念已碎
执念已碎 2020-12-23 00:48

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

相关标签:
1条回答
  • 2020-12-23 01:33

    Fun with bash:

    docker rmi $(docker images | grep stuff_ | tr -s ' ' | cut -d ' ' -f 3)
    
    0 讨论(0)
提交回复
热议问题