Use the last ip as docker host ip (#11742)

This commit is contained in:
Frank Chen 2021-11-20 13:31:39 +08:00 committed by GitHub
parent b3502c3e50
commit 2e3767bef0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ fi
if [ -z "$DOCKER_HOST_IP" ]; then
# Another Mac specific way, when the machine isn't able to resolve its own name
DOCKER_HOST_IP="$(ifconfig | fgrep 'inet ' | fgrep -v 127.0.0.1 | awk '{print $2}')"
DOCKER_HOST_IP="$(ifconfig | fgrep 'inet ' | fgrep -v 127.0.0.1 | awk '{print $2}' | tail -n1)"
fi
if [ -z "$DOCKER_HOST_IP" ]; then