无法findDocker容器中的可运行浏览器

当试图在Docker容器中运行ipython笔记本命令时,发生以下错误:未findWeb浏览器:无法find可运行的浏览器。

PS我正在使用jupyter / all-spark-notebook:4.0图像

$ sudo docker run -it -p 8888:8888 jupyter/all-spark-notebook:4.0 ipython notebook Writing notebook server cookie secret to /.local/share/jupyter/runtime/notebook_cookie_secret Serving notebooks from local directory: /home/jovyan/work 0 active kernels The IPython Notebook is running at: http://localhost:8888/ Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). No web browser found: could not locate runnable browser. 

现在这是一个老话题,但是如果其他人正在寻找解决办法,那就是我跑的命令。

 sudo docker run -it -p 8888:8888 jupyter/all-spark-notebook:4.0 ipython notebook --port=8888 --ip=0.0.0.0 

之后,你会去docker的IP地址(windows- 192.168.99.100:8888 "whatever the the ip of your server":8888 ,* nix- "whatever the the ip of your server":8888的IP地址"whatever the the ip of your server":8888 )而不是本地主机。