mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-22 18:41:37 +00:00
Merge pull request #1171 from justincormack/metrics-proxy-fix
Do not try to run metrics proxy when not configured
This commit is contained in:
commit
09746e4860
@ -124,8 +124,8 @@ start()
|
|||||||
# On desktop forward metrics to host if enabled in daemon.json
|
# On desktop forward metrics to host if enabled in daemon.json
|
||||||
case "$(mobyplatform)" in
|
case "$(mobyplatform)" in
|
||||||
windows|mac)
|
windows|mac)
|
||||||
METRICS_ADDR=$(cat /etc/docker/daemon.json | jq -r '."metrics-addr"')
|
METRICS_ADDR=$(cat /etc/docker/daemon.json | jq -e -r '."metrics-addr"')
|
||||||
if [ -n "$METRICS_ADDR" ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
METRICS_IP="$(echo "$METRICS_ADDR" | cut -d: -f1)"
|
METRICS_IP="$(echo "$METRICS_ADDR" | cut -d: -f1)"
|
||||||
METRICS_PORT="$(echo "$METRICS_ADDR" | cut -d: -f2)"
|
METRICS_PORT="$(echo "$METRICS_ADDR" | cut -d: -f2)"
|
||||||
|
Loading…
Reference in New Issue
Block a user