1.在启动lobehub/lobe-chat:latest容器时报错:
# node[1]: std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start() at ../src/node_platform.cc:68
# Assertion failed: (0) == (uv_thread_create(t.get(), start_thread, this))
----- Native stack trace -----
1: 0xcbc127 node::Assert(node::AssertionInfo const&) [node]
2: 0xd3b96e node::WorkerThreadsTaskRunner::WorkerThreadsTaskRunner(int) [node]
3: 0xd3ba4c node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [node]
4: 0xc702d6 [node]
5: 0xc717d4 node::Start(int, char**) [node]
6: 0x7fa5c4b0024a [/lib/x86_64-linux-gnu/libc.so.6]
7: 0x7fa5c4b00305 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
8: 0xbc630e _start [node]
经查询是docker容器受到资源的限制,无法创建线程。需要在docker run时添加--security-opt seccomp=unconfined参数,允许容器执行全部的系统调用
docker run -d --name lobe-chat -p 10084:3210 --security-opt seccomp=unconfined -e ACCESS_CODE=lobe66xxx lobehub/lobe-chat:latest
docker compose写法如下:
security_opt:
- seccomp=unconfined
标签:node,opt,记录,处理,--,lobe,seccomp,docker
From: https://www.cnblogs.com/zops/p/18220115