From f2ec5332f2829e2fc9b6b20c05871c4006d74018 Mon Sep 17 00:00:00 2001 From: Jan David Mol <mol@astron.nl> Date: Tue, 16 Mar 2021 19:49:34 +0100 Subject: [PATCH] Moved Jupyter settings to compose yml file to allow combination of entry points, and clearer separation of responsibilities --- docker-compose/jupyter.yml | 10 ++++++++-- docker-compose/jupyter/Dockerfile | 6 ------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docker-compose/jupyter.yml b/docker-compose/jupyter.yml index c4b151fab..7f0011446 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 a7324d491..336179e73 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="] -- GitLab