-
-
Save feiz/9ab642f2c278738b9803519c0ffd3f7f to your computer and use it in GitHub Desktop.
dockerコンテナにガッとつなぐやつ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# usage | |
# dcon PIECE_OF_CONTAINER_NAME [COMMAND [ARGUMENTS...]] | |
# | |
# example | |
# $ dcon app1 | |
# $ dcon postg psql -U myuser mydatabase | |
name=$1 | |
shift 1 | |
command=$* | |
docker exec -ti $(docker ps -qf name=$name) ${command:-/bin/sh} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment