我正在尝试将official docker image用于anaconda3。在dockerhub上,给出了有关运行jupyter笔记本的示例:
docker run -i --rm -t -p 8888:8888 continuumio/anaconda3 /bin/bash -c "/opt/conda/bin/conda install jupyter -y --quiet && mkdir /opt/notebooks && /opt/conda/bin/jupyter notebook --notebook-dir=/opt/notebooks --ip='*' --port=8888 --no-browser"
但是随着消息退出
docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"/bin/bash\": stat /bin/bash: no such file or directory": unknown.
此外,我无法使用bash
,apt-get
和其他各种命令行工具。为什么?
答案 0 :(得分:1)
Continuum最近决定将其基本映像从debian切换到alpine linux(请参阅this issue on GitHub)。因此,您需要替换一些命令行工具:
bash
-> sh
apt-get
-> apk
您可以使用docker anaconda3启动jupyter笔记本,如下所示:
docker run -i --rm -t -p 8888:8888 continuumio/anaconda3 /bin/sh -c "/opt/conda/bin/conda install jupyter -y --quiet && mkdir /opt/notebooks && /opt/conda/bin/jupyter notebook --notebook-dir=/opt/notebooks --ip='0.0.0.0' --port=8888 --no-browser"
...并访问http://localhost:8888/