Skip to content

Instantly share code, notes, and snippets.

View marszall87's full-sized avatar
🥃
Coding...

Michał Nykiel marszall87

🥃
Coding...
  • Appfire
  • Gdańsk, Poland
View GitHub Profile
@marszall87
marszall87 / gist:3990e7a0a6bb3579a6e2
Created February 1, 2016 10:08 — forked from eduardocardoso/gist:82a629882ddb02ab3677
Script to delete exited containers and untagged/unused images from docker
#!/bin/bash
set -o errexit
echo "Removing exited docker containers..."
docker ps -a -f status=exited -q | xargs -r docker rm -v
echo "Removing dangling images..."
docker images --no-trunc -q -f dangling=true | xargs -r docker rmi