docker jupyter安装以及设置nginx反向代理

docker jupyter安装:
docker run -d --restart=always -p 55555:8888 --name jupyter -e JUPYTER_ENABLE_LAB=yes -e JUPYTER_TOKEN=password -v /home/jupyter:/home/jovyan/work jupyter/all-spark-notebook:latest
将password更改为你自己的密码

nginx反向代理:
location / {
proxy_pass http://127.0.0.1:55555;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_redirect off;
}

nginx一定要这样设置,要不然python核心可能连不上

发表评论

邮箱地址不会被公开。 必填项已用*标注