diff --git a/docker-compose/jupyter.yml b/docker-compose/jupyter.yml index c4b151fabcb5bd50a90bda46e52288f1b1aa804c..7f0011446935a0c49cef406f5addb870d3fad515 100644 --- a/docker-compose/jupyter.yml +++ b/docker-compose/jupyter.yml @@ -13,8 +13,6 @@ services: jupyter: build: context: jupyter - args: - JUPYTER_WORKDIR: ${TANGO_LOFAR_CONTAINER_DIR}/jupyter-notebooks container_name: ${CONTAINER_NAME_PREFIX}jupyter network_mode: ${NETWORK_MODE} volumes: @@ -27,3 +25,11 @@ services: - DISPLAY=${DISPLAY} ports: - "8888:8888" + working_dir: ${TANGO_LOFAR_CONTAINER_DIR}/jupyter-notebooks + entrypoint: + - /usr/local/bin/wait-for-it.sh + - ${TANGO_HOST} + - --timeout=30 + - --strict + - -- + - /usr/bin/tini -- jupyter notebook --port=8888 --no-browser --ip=0.0.0.0 --allow-root --NotebookApp.token= --NotebookApp.password= diff --git a/docker-compose/jupyter/Dockerfile b/docker-compose/jupyter/Dockerfile index a7324d49157e9b7f0c3b95c483c603306905f9af..336179e73d9320d6f37edf6cdd13231ef291bcec 100644 --- a/docker-compose/jupyter/Dockerfile +++ b/docker-compose/jupyter/Dockerfile @@ -20,9 +20,3 @@ COPY jupyter-kernels /usr/local/share/jupyter/kernels/ ENV TINI_VERSION v0.6.0 ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini RUN sudo chmod +x /usr/bin/tini -ENTRYPOINT ["/usr/bin/tini", "--"] - -# Start jupyter notebooks on startup of container -ARG JUPYTER_WORKDIR=/app # working directory is what Jupyter will expose as storage for its notebooks -WORKDIR ${JUPYTER_WORKDIR} -CMD ["jupyter", "notebook", "--port=8888", "--no-browser", "--ip=0.0.0.0", "--allow-root", "--NotebookApp.token=", "--NotebookApp.password="]