Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docker scripts to use new & improved docker IP detection #1565

Merged
merged 1 commit into from
Dec 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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