无法使用docker命令启动服务器-挂载目录-OCI运行时错误 [英] Unable to start the server using docker command - Mount directory -OCI Runtime error

查看:195
本文介绍了无法使用docker命令启动服务器-挂载目录-OCI运行时错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想根据以下docker命令启动orthanc服务器。但是,当我执行命令时,出现如下所示的错误。

I would like to start the orthanc server based on the below docker command. However when I execute the command, I get the error as shown below.

请注意,orthanc.json和orthanc-db都位于相应的文件夹中

Please note that both the orthanc.json and orthanc-db are present in the respective folders

/orthanc/orthanc.json -orthanc.json位于orthanc文件夹下

/orthanc/orthanc.json - orthanc.json is present under orthanc folder

/ orthanc / orthanc-db -orthanc -db位于orthanc文件夹下

/orthanc/orthanc-db - orthanc-db is present under orthanc folder

/etc/orthanc/orthanc.json --orthanc.json位于/ etc / orthanc文件夹下

/etc/orthanc/orthanc.json - orthanc.json is present under /etc/orthanc folder

/ var / lib / orthanc / orthanc-db -orthanc-db位于/ var / lib / orthanc文件夹下

/var/lib/orthanc/orthanc-db - orthanc-db is present under /var/lib/orthanc folder

上面列出的所有路径均有效。我能够导航到他们

All the paths listed above are valid. I am able to navigate to them

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服务器。不知道为什么文件存在时会引发错误。

Can you please help me fix this issue? I am trying to start the orthanc server through this docker command. not sure why it's throwing an error when the files are present.

推荐答案

您正在从文件夹所在的目录运行容器是(您正在安装的)。这意味着该路径应以当前工作目录作为前缀:

You are running the container from the same directory where your folders are (the ones you are mounting). This means that the path should be prefixed with the current working directory:

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 -- verbose

这篇关于无法使用docker命令启动服务器-挂载目录-OCI运行时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆