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
#!/bin/bash | |
# for coreos with flannel ... | |
# Example use ./iptables.sh --source 172.16.23.0/24 --destination 172.16.23.1 --local 10.2.0.2 --dry-run true | |
while [[ $# > 1 ]] | |
do | |
ARGS="$1" | |
case $ARGS in | |
-s|--source) |
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
#!/bin/bash | |
echo "clean containers ..." | |
docker ps --filter status=exited -aq | xargs --no-run-if-empty docker rm -vf | |
echo "clean images ..." | |
docker images --quiet --filter=dangling=true | xargs --no-run-if-empty docker rmi -f | |
docker images | grep old | awk '{ print $1 " " $2 }' | while read LINE | |
do | |
IMAGE=$(echo $LINE | cut -d' ' -f1) |
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
#!/bin/bash | |
set -e | |
while [[ $# > 0 ]] | |
do | |
case "$1" in | |
--folder) | |
shift | |
FOLDER="$1" |
NewerOlder