mirror of
https://github.com/weaveworks/scope.git
synced 2026-02-14 18:09:59 +00:00
only pass WEAVESCOPE_DOCKER_ARGS to actual probe/app start
and not all the help, version, etc, etc docker runs. In particular this allows passing `--restart=...` in WEAVESCOPE_DOCKER_ARGS. Previously that would break since the non-probe/app docker runs supply `--rm` (as they should) which is incompatible with restart settings.
This commit is contained in:
12
scope
12
scope
@@ -48,8 +48,7 @@ usage() {
|
||||
Launch options:
|
||||
EOF
|
||||
# shellcheck disable=SC2086
|
||||
docker run --rm -e CHECKPOINT_DISABLE --entrypoint=/home/weave/scope \
|
||||
$WEAVESCOPE_DOCKER_ARGS "$SCOPE_IMAGE" -h >&2
|
||||
docker run --rm -e CHECKPOINT_DISABLE --entrypoint=/home/weave/scope "$SCOPE_IMAGE" -h >&2
|
||||
}
|
||||
|
||||
usage_and_die() {
|
||||
@@ -177,14 +176,13 @@ docker_args() {
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v /var/run/scope/plugins:/var/run/scope/plugins \
|
||||
-v /sys/kernel/debug:/sys/kernel/debug \
|
||||
-e CHECKPOINT_DISABLE \
|
||||
$WEAVESCOPE_DOCKER_ARGS
|
||||
-e CHECKPOINT_DISABLE
|
||||
}
|
||||
|
||||
launch_command() {
|
||||
# shellcheck disable=SC2046
|
||||
# shellcheck disable=SC2046,SC2086
|
||||
echo docker run -d --name="$SCOPE_CONTAINER_NAME" $(docker_args) \
|
||||
"$SCOPE_IMAGE" --probe.docker=true
|
||||
$WEAVESCOPE_DOCKER_ARGS "$SCOPE_IMAGE" --probe.docker=true
|
||||
}
|
||||
|
||||
launch_docker4mac_app_command() {
|
||||
@@ -237,7 +235,7 @@ case "$COMMAND" in
|
||||
version)
|
||||
# shellcheck disable=SC2086
|
||||
docker run --rm -e CHECKPOINT_DISABLE --entrypoint=/home/weave/scope \
|
||||
$WEAVESCOPE_DOCKER_ARGS "$SCOPE_IMAGE" --mode=version
|
||||
"$SCOPE_IMAGE" --mode=version
|
||||
;;
|
||||
|
||||
-h | help | -help | --help)
|
||||
|
||||
Reference in New Issue
Block a user