Skip to content

Instantly share code, notes, and snippets.

@subfuzion
Last active May 5, 2016 06:45
Show Gist options
  • Save subfuzion/da73f41ee9394ce37531337d6acabfd8 to your computer and use it in GitHub Desktop.
Save subfuzion/da73f41ee9394ce37531337d6acabfd8 to your computer and use it in GitHub Desktop.
Get container address
addr() {
service=$1
containerport=$2
file=${3:-"docker-compose.yml"}
echo $(docker-machine ip $(docker-machine active)):$(docker-compose -f $file port $service $containerport | cut -d ':' -f 2)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment