We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6f82293 commit 750e015Copy full SHA for 750e015
npi/multinic/routing.dockerfile
@@ -15,4 +15,5 @@ RUN apk add --no-cache \
15
16
# 1. Get Gateway IP from eth1
17
# 2. Route Private Google Access VIPs through eth1
18
-CMD ["/bin/bash", "-c", "GW_IP=$(ip -4 addr show eth1 | grep -oP '(?<=inet\\s)\\d+(\\.\\d+){3}' | awk -F. '{print $1\".\"$2\".\"$3\".1\"}') && ip route add 199.36.153.8/30 via $GW_IP dev eth1"]
+
19
+CMD ["/bin/bash", "-c", "IP_ETH1=$(ip -4 addr show eth1 | grep -oP '(?<=inet\\s)\\d+(\\.\\d+){3}') && GW_ETH1=$(echo $IP_ETH1 | awk -F. '{print $1\".\"$2\".\"$3\".1\"}') && ip route add default via $GW_ETH1 dev eth1 table 100 && ip rule add from $IP_ETH1 lookup 100"]
0 commit comments