Mercurial > public > ssdt-docker
changeset 180:528dedd22857 production
flow: Promoted <hotfix> 'v1.2.2' (ae2b4a5294ff) to 'production'.
author | smith@nwoca.org |
---|---|
date | Mon, 11 Sep 2017 22:01:37 +0100 |
parents | dcfbca72076e (current diff) ae2b4a5294ff (diff) |
children | fc93880cda8d |
files | |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/console.sh Tue Sep 05 20:55:32 2017 +0100 +++ b/scripts/console.sh Mon Sep 11 22:01:37 2017 +0100 @@ -3,7 +3,7 @@ # For docker 1.12 and compose 1.9 (and higher) assume project is assigned to a network # named "${project}_default" per SSDT templates. -source "$( dirname "${BASH_SOURCE[0]}")/.functions.sh" +source "${SSDT_SCRIPTS:-$(dirname "${BASH_SOURCE[0]}")}/.functions.sh" container=$(composeGetContainer ${1?"Must specify the app service of the console to connect to"} ) @@ -11,13 +11,15 @@ if [ "$ip" == "" ] then - ip=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $container) project=$(composeGetProject ${1} ) + ip=$(docker inspect -f "{{with .NetworkSettings.Networks}}{{.${project}_default.IPAddress}}{{end}}" $container) fi if [ "$project" == "" ] then docker run -it -v ${PWD}:/tmp -v ${SSDT_HOME}:/ssdt --rm docker.ssdt.io/ssdt-utils telnet $ip 2000 | tee console.log else + echo "connecting to telnet console on ${container} in ${project}" docker run -it --network ${project}_default --rm docker.ssdt.io/ssdt-utils telnet $ip 2000 | tee console.log fi +