Skip to content

Instantly share code, notes, and snippets.

Avatar

David Bremner DrMavenRebe

  • Chicago
View GitHub Profile
View remove-orphan-images.sh
#!/bin/bash
JQPATH=$(which jq)
if [ "x$JQPATH" == "x" ]; then
echo "Couldn't find jq executable." 1>&2
exit 2
fi
set -eu
shopt -s nullglob
@DrMavenRebe
DrMavenRebe / clean_docker_images.py
Last active Jan 26, 2016
Remove unlinked space from the docker drive
View clean_docker_images.py
#!/usr/bin/env python
"""
Check all existing Docker containers for their mapped paths, and then purge any
zombie directories in docker's volumes directory which don't correspond to an
existing container.
Taken from: https://github.com/docker/docker/issues/6354
"""
import logging
import os