Skip to content

Commit

Permalink
Update docker scripts to use new & improved docker IP detection
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Costanzo <ian@anon-solutions.ca>
  • Loading branch information
ianco committed Dec 17, 2021
1 parent 3fe6715 commit ddbc3b2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion demo/run_bdd
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ if [ ! -z "$DOCKERHOST" ]; then
# provided via APPLICATION_URL environment variable
export RUNMODE="docker"
elif [ -z "${PWD_HOST_FQDN}" ]; then
DOCKERHOST=`docker run --rm --net=host eclipse/che-ip`
# getDockerHost; for details refer to https://github.com/bcgov/DITP-DevOps/tree/main/code/snippets#getdockerhost
. /dev/stdin <<<"$(cat <(curl -s --raw https://raw.githubusercontent.com/bcgov/DITP-DevOps/main/code/snippets/getDockerHost))"
export DOCKERHOST=$(getDockerHost)
export RUNMODE="docker"
else
PWD_HOST="${PWD_HOST_FQDN}"
Expand Down
4 changes: 3 additions & 1 deletion demo/run_demo
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ if [ ! -z "$DOCKERHOST" ]; then
# provided via APPLICATION_URL environment variable
export RUNMODE="docker"
elif [ -z "${PWD_HOST_FQDN}" ]; then
DOCKERHOST=`docker run --rm --net=host eclipse/che-ip`
# getDockerHost; for details refer to https://github.com/bcgov/DITP-DevOps/tree/main/code/snippets#getdockerhost
. /dev/stdin <<<"$(cat <(curl -s --raw https://raw.githubusercontent.com/bcgov/DITP-DevOps/main/code/snippets/getDockerHost))"
export DOCKERHOST=$(getDockerHost)
export RUNMODE="docker"
else
PWD_HOST="${PWD_HOST_FQDN}"
Expand Down
4 changes: 3 additions & 1 deletion docker/manage
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
export MSYS_NO_PATHCONV=1
export DOCKERHOST=${APPLICATION_URL-$(docker run --rm --net=host eclipse/che-ip)}
# getDockerHost; for details refer to https://github.com/bcgov/DITP-DevOps/tree/main/code/snippets#getdockerhost
. /dev/stdin <<<"$(cat <(curl -s --raw https://raw.githubusercontent.com/bcgov/DITP-DevOps/main/code/snippets/getDockerHost))"
export DOCKERHOST=$(getDockerHost)
set -e

SCRIPT_HOME="$(cd "$(dirname "$0")" && pwd)"
Expand Down

0 comments on commit ddbc3b2

Please sign in to comment.