以前,我可以将容器中的文件夹作为卷附加到容器中,如下所示:
docker run -it --rm -v /Users/me/Desktop/Jupyter:/home/jovyan/work -p 8888:8888 jupyter/all-spark-notebook
但是,当我跑步时...
docker run -it -v /Users/me/Desktop/nfscripts:/usr nextflow/nextflow /bin/bash
...我收到以下错误:
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"/usr/local/bin/entry.sh\": stat /usr/local/bin/entry.sh: no such file or directory": unknown.
当我启动一个交互式会话并检查目录时,我得到了基本的/
,并且可以看到usr
目录。
$ docker run -it nextflow/nextflow /bin/bash
$ pwd
/
$ ls
bin dev etc home lib media mnt opt proc root run sbin srv sys tmp usr var
我从Cmd中识别出/usr/local/bin/entry.sh
,它肯定存在是因为我可以接受它。
"Cmd": [
"/bin/sh",
"-c",
"#(nop) ",
"ENTRYPOINT [\"/usr/local/bin/entry.sh\"]"
],
我不允许挂载:/usr
是因为它在入口点的路径中吗?
答案 0 :(得分:0)
您需要安装指定的入口点,该入口点可以与启动交互式会话的目录不同:
docker run -it --rm -v /Users/me/Desktop/nfscripts:/usr/local/bin/entry nextflow/nextflow /bin/bash