Semi-visually delete "dead" docker containers.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker rmi $(comm -3 <(docker images -q | sort) <(docker images -q -a | sort) | sed 's/\t//') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mount /dev/sdz1 /mnt; mount -t proc none /mnt/proc; mount -t sys none /mnt/sys; | |
$ docker run -t -i --hostname=$HOSTNAME --cap-add SYS_CHROOT -v /mnt/:/tmp/ busybox chroot /tmp /sbin/init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include https://get.docker.io | |
#cloud-config | |
dims-container: | |
image: ubuntu | |
command: echo "hello world" | |
environment: | |
- SOMETHING: here | |
- SOMEVAR: value | |
net: "host" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
environment: | |
- key: value | |
- key2: value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import json | |
import sys | |
img_id = sys.argv[1] | |
#json_f = open("%s/json" % head) | |
#img_json = json.load(json_f) | |
#json_f.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for line in $(iostat $(dmsetup ls | sed -n '/swap/{ s/.*, //; s/)//; s/^/dm-/; p; }') | sed 's/\s\+/,/g'); do | |
if (echo $line | grep ^dm- >/dev/null 2>&1); then | |
dm=$(echo $line | cut -d, -f1 | cut -d- -f2); | |
dname=$(dmsetup info -c --noheadings -j 253 -m $dm | cut -d: -f1); | |
echo $line | | |
sed "s/^dm-$dm/$dname/; s/,/\t\t/g;"; | |
else | |
echo "$line" | sed 's/,/\t\t/g;'; | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#% Title: gt-topio | |
#% Author: Eric Windisch | |
#% License: MIT | |
# default value... | |
count=20 | |
filter='.' | |
set -- `getopt c:d:e: $@` >/dev/null 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for i in $(seq 0 1024); do x=$(cut -d/ -f3 <(xenstore-read /local/domain/$i/vm 2>/dev/null)); if [ $x ] && [ $x == $(cat /sys/hypervisor/uuid) ] ; then xenstore-ls /local/domain/$i ; fi ; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#% Title: gt-topiosar | |
#% Author: Eric Windisch | |
#% License: MIT | |
# default value... | |
count=20 | |
#expr="p;" | |
filter='.' |
OlderNewer