From 266b637a83db79c3fd90e3c030685cf17b70eb00 Mon Sep 17 00:00:00 2001 From: Benjamin Raethlein Date: Wed, 2 Oct 2019 13:18:29 +0200 Subject: [PATCH] Additional args to the chp-start command can now be passed via an environment variable ADDITIONAL_ARGS instead of passing it as arguments to the container --- README.md | 2 +- resources/docker-entrypoint.sh | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 17bbc52..0f50217 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ Here are the additional environment variables for the hub: START_CHP - Start the Jupyterhub proxy process separately (The hub should not start the proxy itself, which can be configured via the Jupyterhub config file. This option is built-in to work with zero-to-mlhub-k8s, where the image is also used as the Configurable-Http-Proxy (CHP) image. Args passed to the container are passed to the chp-start command. + Start the Jupyterhub proxy process separately (The hub should not start the proxy itself, which can be configured via the Jupyterhub config file. This option is built-in to work with zero-to-mlhub-k8s, where the image is also used as the Configurable-Http-Proxy (CHP) image. Additional arguments to the chp-start command can be passed to the container by passing an environment variable ADDITIONAL_ARGS, e.g. --env ADDITIONAL_ARGS="--ip=0.0.0.0 --api-ip=0.0.0.0". false diff --git a/resources/docker-entrypoint.sh b/resources/docker-entrypoint.sh index f009db3..ff21fa8 100755 --- a/resources/docker-entrypoint.sh +++ b/resources/docker-entrypoint.sh @@ -2,9 +2,7 @@ printf "Starting ML Hub\n" -# $@ corresponds to the incoming script arguments -incoming_args="$@" -echo "$incoming_args" +incoming_args="$ADDITIONAL_ARGS" execution_mode=${EXECUTION_MODE:-local} if [ "$execution_mode" == "k8s" ]; then # make changes to nginx so that it works in Kubernetes as well