Skip to content

Instantly share code, notes, and snippets.

@fabienengels
Created November 14, 2017 10:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabienengels/4efc8bb84574e586be4c13d74d711aa3 to your computer and use it in GitHub Desktop.
Save fabienengels/4efc8bb84574e586be4c13d74d711aa3 to your computer and use it in GitHub Desktop.
fabien@9b ~ » which postgres_get_port
postgres_get_port () {
docker inspect postgres_$1 | jq -M -r '.[0].NetworkSettings.Ports."5432/tcp"[0].HostPort'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment