-
-
Save ngpestelos/668bf697c24fd76eb9d6 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
# Use 'docker.io' if using the official packages on Ubuntu 14.04+ | |
alias dip="docker inspect --format '{{ .NetworkSettings.IPAddress }}'" | |
drm() { docker rm ; } | |
dri() { docker rmi ; } | |
alias dkd="docker run -d -P" | |
alias dki="docker run -t -i -P" | |
alias docker_rmi_all='docker rmi $(docker images|tail -n +2|awk '\''{print $1":"$2}'\'')' | |
##### | |
# Use to pull then immediately save and gzip an image from a repo: | |
# | |
# docker_pull_save quay.io/repository/organization/repo | |
# | |
# Will create repo.tgz in the current directory | |
function docker_pull_save() { | |
docker pull $1 | |
name=$(basename $1) | |
tgz=${basename%\:?*}.tgz | |
docker save $1 | gzip -9 > $tgz | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment