Skip to content

Commit

Permalink
Add .sh shims for the start-* scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvipanda committed Oct 17, 2023
1 parent 6093870 commit 15f6833
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 1 addition & 5 deletions images/base-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,13 @@ EXPOSE $JUPYTER_PORT
CMD ["start-notebook.py"]

# Copy local files as late as possible to avoid cache busting
COPY start-notebook.py start-singleuser.py /usr/local/bin/
COPY start-notebook.py start-notebook.sh start-singleuser.py start-singleuser.sh /usr/local/bin/
COPY jupyter_server_config.py docker_healthcheck.py /etc/jupyter/

# Fix permissions on /etc/jupyter as root
USER root
RUN fix-permissions /etc/jupyter/

# Symlink scripts to their older .sh variants for backwards compatibility
RUN ln -s /usr/local/bin/start-notebook.py /usr/local/bin/start-notebook.sh && \
ln -s /usr/local/bin/start-singleuser.py /usr/local/bin/start-singleuser.sh

# HEALTHCHECK documentation: https://docs.docker.com/engine/reference/builder/#healthcheck
# This healtcheck works well for `lab`, `notebook`, `nbclassic`, `server` and `retro` jupyter commands
# https://github.com/jupyter/docker-stacks/issues/915#issuecomment-1068528799
Expand Down
5 changes: 5 additions & 0 deletions images/base-notebook/start-notebook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
# Shim to emit warning and call start-notebook.py
echo "WARNING: Use start-notebook.py instead"

exec /usr/local/bin/start-notebook.py "$@"
5 changes: 5 additions & 0 deletions images/base-notebook/start-singleuser.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
# Shim to emit warning and call start-singleuser.py
echo "WARNING: Use start-singleuser.py instead"

exec /usr/local/bin/start-singleuser.py "$@"

0 comments on commit 15f6833

Please sign in to comment.