Last active
January 10, 2020 08:58
-
-
Save Gumichan01/ac5dc3f79c9c2a775798ed78bbdd47ff to your computer and use it in GitHub Desktop.
Simple Jib + docker aliases
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
# Jib | |
alias mvn-jbuild='mvn jib:build' | |
alias mvn-jdocker='mvn jib:dockerBuild' | |
alias gradle-jbuild='gradle jib' | |
alias gradle-jdocker='gradle jibDockerBuild' | |
# Docker | |
alias docker-img='docker images' | |
alias docker-history='. ~/bin/docker-image-history.sh' | |
alias docker-ps='docker process' | |
alias docker-plist='docker ps -a' | |
alias docker-look='. ~/bin/docker-inspect-image.sh' | |
alias docker-logs='docker logs --details' | |
alias docker-rmi='. ~/bin/docker-rm-images.sh' | |
# You need Dive in order to use this alias https://github.com/wagoodman/dive | |
alias docker-dive='dive' |
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/env bash | |
if [ $# -eq 0 ] | |
then | |
echo "Error: no docker image name provided" 1>&2 | |
return 1 | |
else | |
docker images | grep $1 | tr -s ' ' | cut -d ' ' -f3 | head -1 | xargs docker history | |
fi |
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/env bash | |
if [ $# -eq 0 ] | |
then | |
echo "Error: no docker image name provided" 1>&2 | |
return 1 | |
else | |
docker ps -a | grep $1 | tr -s ' ' | rev \ | |
| cut -d ' ' -f1 | rev | xargs docker inspect | |
fi |
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/env bash | |
if [ $# -eq 0 ] | |
then | |
echo "Error: no docker image name provided" 1>&2 | |
return 1 | |
else | |
docker images | grep $1 | tr -s ' ' | du -s ' ' -f3 | xargs docker rmi --force | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment