Skip to content

Commit

Permalink
Merge pull request #6687 from ant-media/fix-ip-address-in-docker
Browse files Browse the repository at this point in the history
Add correct IP address in Docker cluster environments
  • Loading branch information
mekya authored Nov 20, 2024
2 parents d8abd5c + a7696ec commit 74b046c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/server/conf/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ else
fi

if [ "$OS_NAME" != "Darwin" ]; then
LOCAL_IPv4=`ip add | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p'`
LOCAL_IPv4=`ip a | awk '/inet / && !/127.0.0.1/ && !/docker0/ {print $2}' | cut -d/ -f1`
HOST_NAME=`cat /proc/sys/kernel/hostname`
HOST_LINE="$LOCAL_IPv4 $HOST_NAME"

Expand Down

0 comments on commit 74b046c

Please sign in to comment.