From d9f45b585a5e89f270899f4a2e544145ef41b6cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rok=20Ro=C5=A1kar?= Date: Fri, 17 Mar 2023 17:14:46 +0100 Subject: [PATCH] chore: override notebook command --- 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 $@