Docker

Stop and remove all Docker containers,


docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)

Delete images from a particular repository,


docker images | awk '{print $1":"$2}' | grep local/my-service | xargs -n1 docker rmi

Delete containers using a particular image,


docker ps -a | awk '{print $1,$2}' | grep node:12-alpine | awk '{print $1}' | xargs -I {} docker rm {}

Stay up to date

Get notified when I publish. Unsubscribe at any time.