Created
November 23, 2015 22:36
-
-
Save ajayhn/39dccbcea2ec881b4636 to your computer and use it in GitHub Desktop.
bashrc
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
# Allows you to use docker-compose-exec {service} {command} to run a command on the service | |
docker_compose_exec() { | |
docker exec -it $(docker-compose -f compose.yml -p $(basename $PWD) ps | grep $1 | awk '{print $1}') ${@:2} | |
} | |
alias docker-compose-exec=docker_compose_exec |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment