Skip to content

Instantly share code, notes, and snippets.

View DrMavenRebe's full-sized avatar

David Bremner DrMavenRebe

View GitHub Profile
#!/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 January 26, 2016 22:34
Remove unlinked space from the docker drive
#!/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