Skip to content

Instantly share code, notes, and snippets.

@jocho-here
Created March 3, 2020 04:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jocho-here/25a39567f772811b84129b2a9022d709 to your computer and use it in GitHub Desktop.
Save jocho-here/25a39567f772811b84129b2a9022d709 to your computer and use it in GitHub Desktop.
Docker related shell commands
# Description: Exec into the container using bash
# Usage: dockerexec <docker_container_name>
dockerexec() {
docker exec -it $1 bash
}
# Description: Show current docker containers names ONLY
# Usage: dockerps
alias dockerps="docker ps --format \"{{.ID}} {{.Names}}\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment