Semi-visually delete "dead" docker containers.
This file contains hidden or 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/env python | |
| import operator as yx | |
| from functools import partial as S5 | |
| mul=getattr | |
| mul=S5(reduce, (lambda xy:(lambda x,y:x(yx,y))(eval(xy),xy))('mul')) | |
| def S(*_): | |
| """ | |
| Cumulative sum |
This file contains hidden or 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/env python2.7 | |
| import itertools | |
| import subprocess | |
| import time | |
| def soi(s): | |
| #if isinstance(s, int): | |
| # return s | |
| return int(s.split(':')[-1].rstrip()) |
This file contains hidden or 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
| On Thu, Dec 26, 2013 at 7:27 PM, iTunes Store <iTunesStoreSupport@apple.com> wrote: | |
| Dear XXXX, | |
| Hello again!, Thank you for your response, it is much appreciated. | |
| I feel that my emails have not been read. | |
| Your responses do not relate to my problem. | |
| Please read this email. |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 <tunables/global> | |
| profile /usr/bin/docker flags=(attach_disconnected, chroot_relative) { | |
| # Daemon requirements | |
| signal, | |
| ipc rw, | |
| network, | |
| capability, | |
| mount -> /var/lib/docker/**, |
