Skip to content

Instantly share code, notes, and snippets.

@flxxyz
Created September 26, 2022 06:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flxxyz/ae7c8153dbea8cd922edf0ffe700bdf1 to your computer and use it in GitHub Desktop.
Save flxxyz/ae7c8153dbea8cd922edf0ffe700bdf1 to your computer and use it in GitHub Desktop.
通配符删除 docker 镜像
#!/bin/bash
TXT="包含的文本"
docker rmi $(docker images | grep $TXT | awk '$1 { print $1":"$2 }')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment