Add healthcheck command to Dockerfile

This commit is contained in:
Ayaz Salikhov
2022-03-17 15:18:46 +02:00
parent f91b9ad11a
commit 82579cbe97

View File

@@ -171,6 +171,9 @@ 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 --interval=15s --timeout=3s \
CMD wget -O- --no-verbose --tries=1 http://localhost:8888/api || exit 1
# Switch back to jovyan to avoid accidental container runs as root
USER ${NB_UID}