Skip to content

Instantly share code, notes, and snippets.

View kruchone's full-sized avatar

Zach Kruchoski kruchone

  • Rochester, New York
View GitHub Profile
@kruchone
kruchone / docker_overlay_clean.sh
Created October 24, 2017 18:39
Cleans overlay files that no longer belong to any running container, or any image of any running container.
#! /usr/bin/env sh
set -e
set -x
# This is an annotated script that will find and remove docker overlay directories that are not linked to containers,
# nor to images related to running containers. Depending on the containers and images running, this can save some
# space on the host this is run on. It /should/ be safe to execute this without worrying about removing files that the
# running containers/images depend on, but YMMV so 'I take no responsibility yadda yadda...'.
if [ ! -d "/var/lib/docker/overlay/" ]
#!/bin/bash
# This script starts or stops (if it has started) a docker-machine ssh tunnel for
# a port supplied in the first argument. For example:
#
# ./tunnel dev 5000
#
# will forward port 5000 from docker-machine to localhost, allowing the flask
# api to be reached from your development machine as localhost:5000
#
### Keybase proof
I hereby claim:
* I am kruchone on github.
* I am kruchone (https://keybase.io/kruchone) on keybase.
* I have a public key whose fingerprint is 6E47 E2F9 DC7D B32E 1EA4 F922 56B4 F6F8 59D2 2802
To claim this, I am signing this object:
@kruchone
kruchone / b2dtunnel.sh
Last active January 14, 2016 16:24
A script to tunnel ports through boot2docker.
#!/bin/bash
# This script starts or stops (if it has started) a boot2docker ssh tunnel for
# a port supplied in the first argument. For example:
#
# ./b2dtunnel 5000
#
# will forward port 5000 from boot2docker to localhost, allowing the flask
# api to be reached from your development machine.
#