From 0361fdcb19fa86cb640fb716e4b893560f460358 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rok=20Ro=C5=A1kar?= Date: Tue, 21 Mar 2023 14:03:13 +0100 Subject: [PATCH] chore: override notebook command (#320) --- docker/py/entrypoint.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docker/py/entrypoint.sh b/docker/py/entrypoint.sh index 62ac4698..bdc79ccf 100755 --- a/docker/py/entrypoint.sh +++ b/docker/py/entrypoint.sh @@ -45,5 +45,16 @@ fi # Start the SHH daemon in the background /usr/sbin/sshd -f /opt/ssh/sshd_config -E /tmp/sshd.log +# Override the jupyter command to be forward compatible with newer +# images that no longer launch the whole server with `jupyter notebook`. +jupyter() { + if [ "$1" = "notebook" ]; + then + shift + $(which jupyter) server $@; + else $(which jupyter) $@; + fi; +} + # run the command $@