Last active
November 17, 2019 20:47
-
-
Save willopez/3c8bb568a861cff29006eca4a4899601 to your computer and use it in GitHub Desktop.
Useful Docker and Docker Compose 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
alias dc='docker-compose' | |
# Bring all services down | |
alias dcd='docker-compose down' | |
# Attach to all logs of all services | |
alias dcl='docker-compose logs -f' | |
# Run a comand inside a running container | |
alias dcr='docker-compose run --rm' | |
# "Restart" all services | |
alias dcre='docker-compose down && docker-compose up -d && docker-compose logs -f' | |
# Bring all services up in daemon mode | |
alias dcu='docker-compose up -d' | |
# Bring all containers up and attach to their logs | |
alias dcul='docker-compose up -d && docker-compose logs -f' | |
# Remove exited containers | |
alias dprune='docker ps -aq --no-trunc -f status=exited | xargs docker rm' | |
# Show all running containers, with horizontal paging | |
alias dps='docker ps -a | less -S' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment