简体   繁体   English

尝试将另一个卷安装到 clickhouse docker 容器时出错

[英]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 将字符串拆分为:

  • empty string (directory to be mounted)空字符串(要挂载的目录)
  • E:/ch/clickhousedb (mounting point inside the container) E:/ch/clickhousedb(容器内的挂载点)
  • /var/lib/clickhouse (mounting mode) /var/lib/clickhouse(挂载模式)

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.

相关问题 在Powershell中将并行负载运行到Clickhouse Docker容器中 - Running a parallel load into Clickhouse Docker Container in powershell 为什么在 Windows 上的 Docker 中通过 Powershell 将数据加载到 clickhouse 时会出现换行错误? - Why am I getting a line Feed Error when loading data via Powershell into clickhouse in Docker on Windows? 类型“bind”的挂载配置无效:尝试在 Docker for Windows 上运行容器时不存在绑定源路径 - Invalid mount config for type "bind": bind source path does not exist when trying to run container on Docker for Windows 使用挂载点时,如何找出给定NTFS路径所在的卷? - How do I find out what volume a given NTFS path is on when using mount points? 尝试在 Vscode 中运行 kotlin 时出错 - Error when attempting to run kotlin in Vscode 尝试复制继承的权限时出错 - Error when attempting to copy inherited permissions Debian Docker容器错误中的PowerShell Core - PowerShell Core in Debian Docker Container Error Docker容器未运行Windows系统调用错误 - Docker container not running with Windows system call error 创建 Windows docker 容器时出错 - Getting error while creating windows docker container Windows 11 和 Docker:来自守护程序的错误响应:创建挂载源路径时出错(文件存在) - Windows 11 and Docker: Error response from daemon: error while creating mount source path (file exists)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM