Skip to content

Instantly share code, notes, and snippets.

@t-chab
Created November 20, 2018 18:27
Show Gist options
  • Save t-chab/ed5037f9d7257fc773b6e62dc483e32c to your computer and use it in GitHub Desktop.
Save t-chab/ed5037f9d7257fc773b6e62dc483e32c to your computer and use it in GitHub Desktop.
# Some useful docker shell aliases for bash
# Cleanup stopped container (could print some warnings if containers are running)
alias dkr_clean='docker rm $(docker ps -a -q)'
# Cleanup images
alias dkr_clean_img='docker rmi $(docker images |grep '"'"'<none>'"'"' |awk '"'"'{ print $3}'"'"')'
# Start docker-compose using docker-compose.yml in current directory
# Cleaning obsolete containers
alias compose_start='docker-compose up -d --remove-orphans'
# Update all images needed for docker-compose in current directory
alias compose_update='docker-compose pull'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment