[英]Error when attempting to mount another volume to clickhouse docker container
I've been trying to mount a volume to a docker container with clickhouse, specifically on docker desktop windows 10. Following the documentation:我一直在尝试使用 clickhouse 将卷挂载到 docker 容器,特别是在 docker 桌面 Windows 10 上。按照文档:
https://hub.docker.com/r/yandex/clickhouse-server/ https://hub.docker.com/r/yandex/clickhouse-server/
I have no problem setting up the docker container on my C drive which is in my $HOME path and loading data into etc. I want to now mount a custom volume, my E/ drive which is larger as the database will continue to grow.我在我的 $HOME 路径中的 C 驱动器上设置 docker 容器并将数据加载到等中没有问题。我想现在安装一个自定义卷,我的 E/ 驱动器会随着数据库的继续增长而变得更大。 I am getting an error when I run this:运行此命令时出现错误:
docker run -d -p 8123:8123 --name clickhousedb --ulimit nofile=262144:262144 --volume=/E:/ch/clickhousedb:/var/lib/clickhouse yandex/clickhouse-server
specifically this:特别是这个:
Error response from daemon: invalid mode: /var/lib/clickhouse.
Any ideas what might be the issue?任何想法可能是什么问题?
The issue is the "/" character right after " --volume=", which tells the docker CLI to split the string as:问题是“--volume=”后面的“/”字符,它告诉 docker CLI 将字符串拆分为:
Docker thought "/var/lib/clickhouse" was the mode for the volume mount, hence the error message. Docker 认为“/var/lib/clickhouse”是卷挂载的模式,因此出现错误消息。
Seemed to be a permission issue.似乎是一个权限问题。 Was able to access the root of the E drive:能够访问E盘的根目录:
docker run -d -p 8134:8123 --name clickhousedb --ulimit nofile=262144:262144 --volume=E:/:/var/lib/clickhouse yandex/clickhouse-server
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.