From 9db40baeab1d489a2c756b2aa2d0234fadefff66 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Sun, 29 Jul 2018 19:15:26 +0200 Subject: [PATCH] chg: dev: ``get_docker_ip`` should give all IP and not filter only to temporary network Indeed as the database container might already be launched on another network before any script is launched. We can use this instance with this modification. --- bin/compose | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/compose b/bin/compose index 6017493..efd4495 100755 --- a/bin/compose +++ b/bin/compose @@ -562,11 +562,12 @@ _dcmd() { db_docker_opts="$db_docker_opts -v $SERVER_ROOT_PREFIX$DB_PASSFILE:$DB_PASSFILE" fi + ## XXXX was here: actualy, we need only connection between this version and the client version debug docker run -i --rm \ - $db_docker_opts --network $_DB_NAME \ + $db_docker_opts \ --entrypoint "$command" "$DOCKER_BASE_IMAGE" $db_cmd_opts "$@" docker run -i --rm \ - $db_docker_opts --network $_DB_NAME \ + $db_docker_opts \ --entrypoint "$command" "$DOCKER_BASE_IMAGE" $db_cmd_opts "$@" } export -f _dcmd @@ -605,7 +606,7 @@ export -f get_docker_ips get_docker_ip() { local name="$1" - get_docker_ips "$name" | grep "^${_DB_NAME}:" + get_docker_ips "$name" } export -f get_docker_ip