1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Docker環境でJupyterNotebookのセキュリティトークンを無効にする方法

Last updated at Posted at 2021-11-14

ubuntu18.04上でdocker環境を作ってJupyterNotebookを起動するときに、セキュリティトークンの入力を省略したかったので試行錯誤してみました。

こちらの記事のコメントの部分でうまく回避できたようです。セキュリティ的にはまずいので、問題ない環境でのみ行ってください。
https://stackoverflow.com/questions/41159797/how-to-disable-password-request-for-a-jupyter-notebook-session

custom-start.sh というファイルを作成

custom-start.sh
jupyter notebook  --allow-root --no-browser --ip=0.0.0.0 --port=8886 --NotebookApp.token='' --NotebookApp.password=''

Dockerfileの最後で以下のようにしてcustom-start.shを起動

Dockerfile
WORKDIR /root
COPY custom-start.sh /root
RUN chmod +x /root/custom-start.sh
CMD /root/custom-start.sh
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?