Skip to content

Commit

Permalink
Add start period and retries
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayaz Salikhov committed Mar 17, 2022
1 parent a29156a commit 9ee6670
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion base-notebook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,10 @@ RUN sed -re "s/c.ServerApp/c.NotebookApp/g" \
/etc/jupyter/jupyter_server_config.py > /etc/jupyter/jupyter_notebook_config.py && \
fix-permissions /etc/jupyter/

# 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
HEALTHCHECK --interval=15s --timeout=3s \
HEALTHCHECK --interval=15s --timeout=3s --start-period=5s --retries=3 \
CMD wget -O- --no-verbose --tries=1 http://localhost:8888/api || exit 1

# Switch back to jovyan to avoid accidental container runs as root
Expand Down

0 comments on commit 9ee6670

Please sign in to comment.