mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-05 03:01:11 +00:00
Merge pull request #2097 from kinvolk/schu/scope-container-name
scope launcher script: allow setting SCOPE{_APP,}_CONTAINER_NAME
This commit is contained in:
7
scope
7
scope
@@ -12,8 +12,11 @@ fi
|
||||
IMAGE_VERSION=${VERSION:-$IMAGE_VERSION}
|
||||
SCOPE_IMAGE_NAME=weaveworks/scope
|
||||
SCOPE_IMAGE="$SCOPE_IMAGE_NAME:$IMAGE_VERSION"
|
||||
SCOPE_CONTAINER_NAME=weavescope
|
||||
SCOPE_APP_CONTAINER_NAME=weavescope-app
|
||||
# Careful: it's easy to operate on (e.g. stop) the wrong scope instance
|
||||
# when SCOPE{_APP,}_CONTAINER_NAME values differ between runs. Handle
|
||||
# with care.
|
||||
SCOPE_CONTAINER_NAME="${SCOPE_CONTAINER_NAME:-weavescope}"
|
||||
SCOPE_APP_CONTAINER_NAME="${SCOPE_APP_CONTAINER_NAME:-weavescope-app}"
|
||||
IP_REGEXP="[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}"
|
||||
IP_ADDR_CMD="find /sys/class/net -type l | xargs -n1 basename | grep -vE 'docker|veth|lo' | \
|
||||
xargs -n1 ip addr show | grep inet | awk '{ print \$2 }' | grep -oE '$IP_REGEXP'"
|
||||
|
||||
Reference in New Issue
Block a user