From 9ee6670320cafc15d7bb2fae132c0c68fbd4aeb0 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Thu, 17 Mar 2022 16:14:52 +0200 Subject: [PATCH] Add start period and retries --- base-notebook/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/base-notebook/Dockerfile b/base-notebook/Dockerfile index c51a1feb..72d58605 100644 --- a/base-notebook/Dockerfile +++ b/base-notebook/Dockerfile @@ -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