Skip to content

Instantly share code, notes, and snippets.

@daliborgogic
Last active April 6, 2018 13:07
Show Gist options
  • Save daliborgogic/5cc7c6304f4dfa109df0728cf4c4405e to your computer and use it in GitHub Desktop.
Save daliborgogic/5cc7c6304f4dfa109df0728cf4c4405e to your computer and use it in GitHub Desktop.
bash docker alias
# List containers
alias dps='docker ps'
# Fetch the logs of a container
dl() {
docker logs $1 -f
}
# Run a command in a running container
de() {
docker exec -i -t $1 /bin/sh
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment