Last active
December 13, 2017 09:58
-
-
Save TheMoroccan09/832a3fecc9d5120d3a5cefa732e6727c to your computer and use it in GitHub Desktop.
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
alias good_night='shutdown -P 30' | |
alias docker_ip=fct_docker_ip | |
alias docker_pretty='docker ps --format "table {{.ID}}\t{{.Image}}\t{{.Ports}}\t{{.Names}}"' | |
alias docker_clear=fct_docker_clear | |
fct_docker_ip(){ | |
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "$1" | |
} | |
fct_docker_clear(){ | |
DOCKER_PIDS=$(docker ps -a -q) | |
if [ -n "$DOCKER_PIDS" ]; then | |
docker stop $DOCKER_PIDS && docker rm $DOCKER_PIDS | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment