Skip to content

Commit 25b0ded

Browse files
Fix notebook builds (#335)
* Fix notebook builds * Set allow_origin correctly * Invert quotes * Refactor startup commands
1 parent c4af998 commit 25b0ded

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

build/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ services:
1616

1717
docker-stacks-foundation:
1818
build:
19-
context: github.com/jupyter/docker-stacks.git#main:docker-stacks-foundation
19+
context: github.com/jupyter/docker-stacks.git#main:images/docker-stacks-foundation
2020
dockerfile: Dockerfile
2121
args:
2222
PYTHON_VERSION: "3.10"

notebook/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ RUN mkdir /opt/app \
7171
# Copy over the example as NB_USER. Unfortuantely we can't use $NB_UID/$NB_GID
7272
# in the `--chown` statement, so we need to hardcode these values.
7373
COPY --chown=1000:100 examples/ /home/$NB_USER/examples
74-
COPY prepare.sh /usr/bin/prepare.sh
74+
COPY prepare.sh /usr/local/bin/before-notebook.d/
75+
COPY run.sh /run.sh
7576

7677
# HEALTHCHECK pulled from upstream `base-notebook`
7778
HEALTHCHECK --interval=15s --timeout=3s --start-period=5s --retries=3 \
@@ -80,5 +81,5 @@ HEALTHCHECK --interval=15s --timeout=3s --start-period=5s --retries=3 \
8081

8182
USER $NB_USER
8283

83-
ENTRYPOINT ["tini", "--", "/usr/bin/prepare.sh"]
84-
CMD ["jupyter", "lab", '--NotebookApp.base_url="${NB_PREFIX:-/}"', '${JUPYTERLAB_ARGS}']
84+
# CMD ["jupyter", "lab", '--NotebookApp.base_url="${NB_PREFIX:-/}"', '--NotebookApp.allow_origin="*"', '${JUPYTERLAB_ARGS}']
85+
CMD '/run.sh'

notebook/prepare.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,3 @@ if [ "$EXTRA_PIP_PACKAGES" ]; then
3232
echo "EXTRA_PIP_PACKAGES environment variable found. Installing".
3333
/opt/conda/bin/pip install $EXTRA_PIP_PACKAGES
3434
fi
35-
36-
37-
# Execute the jupyterlab as specified.
38-
exec start.sh $@

notebook/run.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
jupyter lab --NotebookApp.base_url="${NB_PREFIX:-/}" --NotebookApp.allow_origin="*" ${JUPYTERLAB_ARGS}

0 commit comments

Comments
 (0)