From 47071890731a8a484364baa3f80d1cfd04859ef8 Mon Sep 17 00:00:00 2001 From: Andreas Zeller Date: Mon, 1 Jul 2024 15:41:47 +0200 Subject: [PATCH] By default, have Dockerfile start jupyter server --- binder/Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/binder/Dockerfile b/binder/Dockerfile index aca9181e..f967ad54 100644 --- a/binder/Dockerfile +++ b/binder/Dockerfile @@ -69,9 +69,6 @@ WORKDIR ${PROJECT} # Install the required Linux packages RUN apt-get install -y $(grep -v '^#' binder/apt.txt); exit 0 -# Expose port 8888, so it can be reached from the outside (for local testing) -EXPOSE 8888 - # From here on, we are a user USER ${NB_USER} @@ -90,3 +87,9 @@ RUN pip install -r binder/requirements.txt; exit 0 # Run the postBuild script (to set up Jupyter, sign notebooks and more) RUN bash binder/postBuild + +# Expose port 8888, so it can be reached from the outside (for local testing) +EXPOSE 8888 + +# If nothing else is specified, start a Jupyter server +CMD ["sh", "-c", "jupyter lab --port=8888 --no-browser --ip=* docs/notebooks"]