jupyter notebook 的docker compose 配置

配置文件如下

version: "3"
services:
  jupyter-notebook:
      image: jupyter/base-notebook
      container_name: notebook-container
      restart: always
      volumes:
        - D:/code/docker_project/jupyter/data:/home/docker_worker/work
      ports:
        - 8888:8888 #更改外部進入的埠號,若無必要也可以都設為 8888
      command: "start-notebook.sh"
      user: root
      environment:
        - NB_USER=docker_worker
        - NB_UID=1008
        - NB_GID=1011
        - CHOWN_HOME=yes
        - CHOWN_HOME_OPT=-R
        - JUPYTER_TOKEN=easy 
      # command: jupyter notebook --NotebookApp.iopub_data_rate_limit=3e10
         
# volumes:
#     data: #確保你下次重新開容器時,原先編輯的資料還會被保留下來

## 参考

[stefanproell/jupyter-notebook-docker-compose: A docker-compose file for launching Jupyter Notebooks in a container.](https://github.com/stefanproell/jupyter-notebook-docker-compose )]

上一篇:喜讯:RDS报警功能接入云监控


下一篇:图解Kafka分区副本同步限流机制三部曲(源码原理篇+测试用例 )