Docker 在 M1 芯片 MacOS 上启动 Clickhouse-server 容器 21.11 失败

Docker failed starting Clickhouse-server container 21.11 on M1 chip MacOS

我试图在 m1 芯片 MacOS 系统上启动一个 clickhouse-server 容器,不幸的是它抛出以下错误并不断自行重启。

不知道有没有遇到过类似问题的朋友可以分享一下想法?谢谢

❯ docker run -it -p 9000:9000 -p 9009:9009 -p 8123:8123 --platform linux/amd64 --ulimit nofile=262144:262144 yandex/clickhouse-server:21.11
runtime: failed to create new OS thread (have 2 already; errno=22)
fatal error: newosproc

runtime stack:
runtime.throw(0x4cb21f, 0x9)
    /usr/local/go/src/runtime/panic.go:566 +0x95
runtime.newosproc(0xc420028000, 0xc420037fc0)
    /usr/local/go/src/runtime/os_linux.go:160 +0x194
runtime.newm(0x4d6db8, 0x0)
    /usr/local/go/src/runtime/proc.go:1572 +0x132
runtime.main.func1()
    /usr/local/go/src/runtime/proc.go:126 +0x36
runtime.systemstack(0x53ae00)
    /usr/local/go/src/runtime/asm_amd64.s:298 +0x79
runtime.mstart()
    /usr/local/go/src/runtime/proc.go:1079

goroutine 1 [running]:
runtime.systemstack_switch()
    /usr/local/go/src/runtime/asm_amd64.s:252 fp=0xc420022768 sp=0xc420022760
runtime.main()
    /usr/local/go/src/runtime/proc.go:127 +0x6c fp=0xc4200227c0 sp=0xc420022768
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc4200227c8 sp=0xc4200227c0
Configuration file '/etc/clickhouse-server/config.xml' isn't readable by user with id '101'

这是意料之中的。您需要使用 ARM 映像

https://hub.docker.com/r/altinity/clickhouse-server/tags?page=1&name=arm

试试图片 altinity/clickhouse-server:21.12.3.32.altinitydev.arm