Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # if `HOST_IP` is manually configured as env
- HOST="$HOST_IP"
- # try to get the ip of the host from ns host.docker.internal
- if [[ -z "$HOST" ]]; then
- HOST=$(getent hosts host.docker.internal | awk '{ print $1 }')
- fi
- # try to get the linux host ip
- if [[ -z "$HOST" ]]; then
- HOST=$(ip route | awk 'NR==1 {print $3}')
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement