Skip to content

Instantly share code, notes, and snippets.

@RobertKielty
Created September 5, 2016 09:45
Show Gist options
  • Save RobertKielty/73a3fc96c2a9a99d93edcc284bdcca51 to your computer and use it in GitHub Desktop.
Save RobertKielty/73a3fc96c2a9a99d93edcc284bdcca51 to your computer and use it in GitHub Desktop.
Docker Aliases
# Launch /bin/bash interactively on your only running container
# H.B.D (assumptions)
# 1. You have one and only one container running
# 2. /bin/bash is present in your built container
# TODO Make robust enough to handle multiple containers
alias dbash='docker exec -it $(docker ps --format "{{.Names}}") /bin/bash'
alias dps='docker ps'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment