Skip to content

Commit

Permalink
Fetching only the first IP address from ifconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
mikescandy authored and PiotrJustyna committed Oct 19, 2021
1 parent a9b1650 commit 75a6509
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 3/run-client-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# 2020-12-07 PJ:
# Code below gets local IP for dockerized applications to function and communicate correctly.
ADVERTISEDIP=`ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'`
ADVERTISEDIP=`ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1' | grep -m1 ""`
GATEWAYPORT=3000

docker build -t client -f ./ops/Client/Dockerfile ./ &&
Expand Down
2 changes: 1 addition & 1 deletion 3/run-silo-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# 2020-12-07 PJ:
# Code below gets local IP for dockerized applications to function and communicate correctly.
ADVERTISEDIP=`ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'`
ADVERTISEDIP=`ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1' | grep -m1 ""`
GATEWAYPORT=3000

docker build -t silo-host -f ./ops/SiloHost/Dockerfile ./ &&
Expand Down

0 comments on commit 75a6509

Please sign in to comment.