We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents db4003e + 701e2ef commit 8e3c5d6Copy full SHA for 8e3c5d6
1 file changed
run_containerized.sh
@@ -243,7 +243,7 @@ configure_host_dns() {
243
local HOST_IP=""
244
245
# Method 1: Try to get the primary network interface IP (not loopback)
246
- HOST_IP=$(ip -4 addr show 2>/dev/null | grep -oP '(?<=inet\s)\d+(\.\d+){3}' | grep -v '^127\.' | head -1)
+ HOST_IP=$(ip -4 addr show 2>/dev/null | grep 'inet ' | awk '{print $2}' | cut -d/ -f1 | grep -v '^127\.' | head -1)
247
if [ -n "$HOST_IP" ]; then
248
log_info "Method 1 (primary interface): $HOST_IP"
249
fi
0 commit comments