Skip to content

Commit

Permalink
ports subcommand for dc wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
pengwynn committed Aug 2, 2017
1 parent 2ec1ab9 commit 89fd3bb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bin/dc
Expand Up @@ -25,6 +25,10 @@ function dc_console {
docker-compose exec "$1" /bin/bash
}

function dc_ports {
docker ps --filter name="$1" --format "{{.Names}}: {{.Ports}}"
}

if [[ $# > 0 ]]; then
case "$1" in
clean )
Expand All @@ -41,6 +45,10 @@ if [[ $# > 0 ]]; then
nuke )
dc_nuke
;;
ports )
shift
dc_ports "$@"
;;
rebuild )
shift
dc_rebuild "$@"
Expand Down

0 comments on commit 89fd3bb

Please sign in to comment.