Skip to content

Instantly share code, notes, and snippets.

@m-tmatma
Last active December 28, 2020 00:07
Show Gist options
  • Save m-tmatma/79150a2b28b944e51bc9534c284e1b79 to your computer and use it in GitHub Desktop.
Save m-tmatma/79150a2b28b944e51bc9534c284e1b79 to your computer and use it in GitHub Desktop.
docker utility
#!/bin/sh
# original code is https://qiita.com/yuta-ron/items/65861ca75bd0990d0065
alias dps='docker ps --format "{{.ID}}\t{{.Image}}\t{{.Status}}\t{{.Command}}\t{{.RunningFor}}"'
alias dexec='docker exec -it $(dps | peco | cut -f 1) bash'
alias dstop='docker stop $(dps | peco | cut -f 1)'
alias dlogs='docker logs $(dps | peco | cut -f 1)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment