Spaces:
Sleeping
Sleeping
Update Dockerfile
#1
by lbls888 - opened
- Dockerfile +12 -3
Dockerfile
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
|
|
| 1 |
FROM ghcr.io/veloera/veloera:latest
|
| 2 |
|
|
|
|
| 3 |
USER root
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
RUN mkdir -p /data && \
|
| 6 |
-
chown -R 1000:1000 /data
|
| 7 |
-
python3 -c "import json; f=open('/root/openaiw.json','r'); config=json.load(f); f.close(); [p.update({'headers':{'User-Agent':'Mozilla/5.0'}}) for p in config.get('providers',[]) if 'headers' not in p]; f=open('/root/openaiw.json','w'); json.dump(config,f,indent=2); f.close()"
|
| 8 |
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 拉取 Veloera 官方预构建的最新 Docker 镜像
|
| 2 |
FROM ghcr.io/veloera/veloera:latest
|
| 3 |
|
| 4 |
+
# 切换到 root 用户,以便有权限修改文件系统
|
| 5 |
USER root
|
| 6 |
|
| 7 |
+
# Veloera 尝试在 /data/logs 创建目录。
|
| 8 |
+
# 它也需要写入 SQLite 数据库,通常路径类似于 /data/veloera.db 或 /data/db/veloera.db
|
| 9 |
+
# 我们需要确保 /data 目录本身对于 Veloera 应用运行的用户是可写的。
|
| 10 |
+
# 很多 Docker 镜像中的非 root 用户会使用 UID 1000。
|
| 11 |
+
# 我们先创建 /data 目录 (如果它不存在),然后将其所有权赋给 UID 1000 GID 1000。
|
| 12 |
RUN mkdir -p /data && \
|
| 13 |
+
chown -R 1000:1000 /data
|
|
|
|
| 14 |
|
| 15 |
+
# 复制配置文件到容器内
|
| 16 |
+
RUN mkdir -p /root/.openclaw
|
| 17 |
+
COPY openclaw.json /root/.openclaw/openclaw.json
|
| 18 |
+
RUN chmod 644 /root/.openclaw/openclaw.json
|