Skip to content

Instantly share code, notes, and snippets.

@diegoquintanav
Created June 29, 2018 19:21
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 diegoquintanav/70487799cde8ce77dae03151fbbcf906 to your computer and use it in GitHub Desktop.
Save diegoquintanav/70487799cde8ce77dae03151fbbcf906 to your computer and use it in GitHub Desktop.
docker-aliases

Docker aliases

# Show the ip address of the container
alias dip="docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'"

# Show the ID of the last container used
alias dlq="docker ps -lq"

# remove dangling images
alias drm-dangling="docker image rm $(docker image ls -q -f dangling=true) -f"

# run a shell process from an existing image
alias drun-shell="docker run -it --entrypoint sh"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment