Fix HEALTHCHECK when GEN_CERT=yes

This commit is contained in:
Ayaz Salikhov
2022-05-13 17:31:33 +03:00
parent 0345f35980
commit c1067a67af

View File

@@ -166,7 +166,8 @@ RUN sed -re "s/c.ServerApp/c.NotebookApp/g" \
# 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 --start-period=5s --retries=3 \
CMD wget -O- --no-verbose --tries=1 http://localhost:8888${JUPYTERHUB_SERVICE_PREFIX:-/}api || exit 1
CMD wget -O- --no-verbose --tries=1 --no-check-certificate \
http${GEN_CERT:+s}://localhost:8888${JUPYTERHUB_SERVICE_PREFIX:-/}api || exit 1
# Switch back to jovyan to avoid accidental container runs as root
USER ${NB_UID}