【发布时间】:2019-05-24 09:09:24
【问题描述】:
我想根据以下 docker 命令启动 orthanc 服务器。但是,当我执行命令时,我收到如下所示的错误。
请注意,orthanc.json 和 orthanc-db 都存在于各自的文件夹中
/orthanc/orthanc.json - orthanc.json 存在于 orthanc 文件夹下
/orthanc/orthanc-db - orthanc-db 存在于 orthanc 文件夹下
/etc/orthanc/orthanc.json - orthanc.json 存在于 /etc/orthanc 文件夹下
/var/lib/orthanc/orthanc-db - orthanc-db 存在于 /var/lib/orthanc 文件夹下
上面列出的所有路径都是有效的。我可以导航到他们
Docker 命令启动 orthanc 服务器
docker run -p 4242:4242 -p 8042:8042 --rm --name orthanc -v
/orthanc/orthanc.json:/etc/orthanc/orthanc.json -v /orthanc/orthanc-
db:/var/lib/orthanc/orthanc-db jodogne/orthanc-plugins /etc/orthanc --
verbose
执行命令后的错误信息
Error response from daemon: OCI runtime create failed:
container_linux.go:345: starting container process caused "process_lin
ux.go:424: container init caused \"rootfs_linux.go:58: mounting
\\\"/orthanc/orthanc.json\\\" to rootfs \\\"/var/lib/docker/overlay2/
48131fde47610cf1bac93d0316e2c1d6dfbfdb90a0e6cc24344cc6a1308eaccd/merged\
\\"at \\\"/var/lib/docker/overlay2/48131fde47610cf1bac93d031
6e2c1d6dfbfdb90a0e6cc24344cc6a1308eaccd/merged/etc/orthanc/orthanc.json\
\\"caused \\\"not a directory\\\"\"": unknown: Are you tryin
g to mount a directory onto a file (or vice-versa)? Check if the
specified host path exists and is the expected type.
你能帮我解决这个问题吗?我正在尝试通过此 docker 命令启动 orthanc 服务器。不知道为什么当文件存在时它会抛出错误。
【问题讨论】:
-
我看到了这条消息。您在哪个操作系统上运行?你是直接运行docker还是在docker setup中运行某种docker?还要确定的是,“/orthanc”确实在根“/”中,而不是在当前文件夹中,对吗?在此期间,我正在尝试运行相同的操作。
-
而对于 etc 和 var 文件夹,我直接使用 cd /var/.. 和 cd /etc/.... Orthanc (child) 离家低一层,它在 nvidiadeploy (parent) 下家中的文件夹
-
啊,关于操作系统,我的本地桌面是 windows,我连接到 Ubuntu 中的远程系统以运行 docker 命令。
-
所以 /orthanc 文件夹不在根级别。我认为您的命令应该如下所示: docker run -p 4242:4242 -p 8042:8042 --rm --name orthanc -v $(pwd)/orthanc/orthanc.json:/etc/orthanc/orthanc.json - v $(pwd)/orthanc/orthanc- db:/var/lib/orthanc/orthanc-db jodogne/orthanc-plugins /etc/orthanc -- 详细错误消息
-
/etc 和 /var 在容器内,所以它们不会产生问题
标签: docker docker-machine docker-container nvidia-docker docker-command