Skip to content
This repository was archived by the owner on Jan 6, 2021. It is now read-only.

Commit b10db32

Browse files
committed
環境変数BASEURLでベースurlを変更できるようにした
1 parent 15d88c1 commit b10db32

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Dockerfile

+13
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,21 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1919

2020
# Install Jupyter Lab
2121
RUN pip install jupyterlab
22+
23+
# Run Script
2224
RUN echo '#!/usr/bin/env bash \n jupyter lab "$@"' > /run_jupyter.sh
2325

26+
# Base url setting
27+
RUN { \
28+
echo "if 'BASEURL' in os.environ:"; \
29+
echo " baseurl = os.environ['BASEURL']"; \
30+
echo " if baseurl:"; \
31+
echo " c.NotebookApp.base_url = baseurl"; \
32+
echo " else:"; \
33+
echo " c.NotebookApp.base_url = ''"; \
34+
echo " del os.environ['BASEURL']"; \
35+
} | tee -a /root/.jupyter/jupyter_notebook_config.py
36+
2437
# Copy sample notebooks.
2538
COPY notebooks /notebooks
2639

0 commit comments

Comments
 (0)