Skip to content

Instantly share code, notes, and snippets.

@feiz
Created April 19, 2017 06:57
Show Gist options
  • Save feiz/0333b07d7c431baa7893c358dadfab66 to your computer and use it in GitHub Desktop.
Save feiz/0333b07d7c431baa7893c358dadfab66 to your computer and use it in GitHub Desktop.
dockerコンテナにガッとattachするやつ
#!/bin/sh
# usage
# datt PIECE_OF_CONTAINER_NAME
#
# example
# $ datt app1
# $ datt postg psql -U myuser mydatabase
#
# This is useful for using pdb.
name=$1
docker attach $(docker ps -qf name=$name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment