Skip to content

Commit

Permalink
Merge pull request #15 from WadeBarnes/fix/docker-updates
Browse files Browse the repository at this point in the history
Centralize docker host IP script.
  • Loading branch information
swcurran committed Dec 8, 2021
2 parents 47d8894 + d4cbf8e commit f2a75bd
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions manage
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash

export MSYS_NO_PATHCONV=1

# 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))"
set -e

SCRIPT_HOME="$(cd "$(dirname "$0")" && pwd)"
Expand Down Expand Up @@ -51,11 +52,7 @@ exportEnvironment() {
export MEDIATOR_AGENT_HTTP_IN_PORT=3000

if [ -z "${PWD_HOST_FQDN}" ]; then
if [[ $(uname) == "Linux" ]] ; then
DOCKERHOST=`docker run --rm --net=host eclipse/che-ip`
else
DOCKERHOST=host.docker.internal
fi
export DOCKERHOST=$(getDockerHost)
export ENV=local
export MEDIATOR_ENDPOINT_URL=http://${DOCKERHOST}:${MEDIATOR_AGENT_HTTP_IN_PORT}
else
Expand Down

0 comments on commit f2a75bd

Please sign in to comment.