Last active
September 1, 2018 15:24
-
-
Save maxwellb/d18f3c841a9a1123e973efce69d77be5 to your computer and use it in GitHub Desktop.
Docker .bash_aliases
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
# CLI helpers | |
alias ls-docker-image='docker image list | sed -E '\''s/\s+/\t/g'\'' | cut -f 1,2 | sed -E '\''s/(.*)\s+(.*)/\1:\2/'\'' | tail -n+2 | sort | uniq' | |
alias update-docker-images='ls-docker-image | while read r ; do docker pull $r ; done' | |
# Docker commands | |
## az: microsoft/azure-cli | |
alias az='docker inspect az 2>/dev/null >/dev/null || docker run -dit --name az microsoft/azure-cli >/dev/null && docker inspect az | grep Status | grep -v running >/dev/null && docker start az >/dev/null && false || docker exec -it az az' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment