echo8900 commited on
Commit
e6a204d
·
verified ·
1 Parent(s): 16a85d7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -15
Dockerfile CHANGED
@@ -2,19 +2,14 @@ FROM ghcr.io/openclaw/openclaw:latest
2
 
3
  USER root
4
 
5
- # Copy Space repo files into container
6
  COPY openclaw.json /app/openclaw-template.json
7
  COPY setup-hf-config.mjs /app/spaces/huggingface/setup-hf-config.mjs
8
  COPY entrypoint.sh /app/entrypoint.sh
9
- COPY hf-sync-manager.mjs /app/hf-sync-manager.mjs
10
  COPY security-check.sh /app/security-check.sh
11
- COPY diagnose.sh /app/diagnose.sh
12
 
13
  # PATCH: fix meta.lastTouchedAt triggering unnecessary gateway restarts
14
- # Issue: https://github.com/openclaw/openclaw/issues/11744
15
- # meta.lastTouchedAt is updated on every config write, but it is not in
16
- # BASE_RELOAD_RULES, so every config save triggers a full gateway restart.
17
- # Fix: inject {prefix:"meta",kind:"none"} into BASE_RELOAD_RULES.
18
  RUN node -e " \
19
  const fs = require('fs'); \
20
  const { execSync } = require('child_process'); \
@@ -26,7 +21,6 @@ RUN node -e " \
26
  } \
27
  const bundles = findBundles(); \
28
  if (bundles.length === 0) { console.log('[patch] No bundle found - skipping'); process.exit(0); } \
29
-
30
  let patched = 0; \
31
  bundles.forEach(function(file) { \
32
  let src = fs.readFileSync(file, 'utf-8'); \
@@ -53,15 +47,10 @@ RUN node -e " \
53
  console.log('[patch] Done. Patched: ' + patched + '/' + bundles.length); \
54
  " || echo "[patch] Non-fatal: patch step failed"
55
 
56
- RUN chmod +x /app/entrypoint.sh \
57
- /app/security-check.sh && \
58
  mkdir -p /home/user && \
59
  chown -R node:node /home/user && \
60
- chown node:node /app/entrypoint.sh \
61
- /app/hf-sync-manager.mjs \
62
- /app/security-check.sh \
63
- /app/openclaw-template.json \
64
- /app/spaces/huggingface/setup-hf-config.mjs
65
 
66
  USER node
67
 
 
2
 
3
  USER root
4
 
5
+ # 只复制当前实际存在的文件
6
  COPY openclaw.json /app/openclaw-template.json
7
  COPY setup-hf-config.mjs /app/spaces/huggingface/setup-hf-config.mjs
8
  COPY entrypoint.sh /app/entrypoint.sh
 
9
  COPY security-check.sh /app/security-check.sh
10
+ COPY diagnose.sh /app/diagnose.sh # ← Claude 的检测脚本,保留这一行
11
 
12
  # PATCH: fix meta.lastTouchedAt triggering unnecessary gateway restarts
 
 
 
 
13
  RUN node -e " \
14
  const fs = require('fs'); \
15
  const { execSync } = require('child_process'); \
 
21
  } \
22
  const bundles = findBundles(); \
23
  if (bundles.length === 0) { console.log('[patch] No bundle found - skipping'); process.exit(0); } \
 
24
  let patched = 0; \
25
  bundles.forEach(function(file) { \
26
  let src = fs.readFileSync(file, 'utf-8'); \
 
47
  console.log('[patch] Done. Patched: ' + patched + '/' + bundles.length); \
48
  " || echo "[patch] Non-fatal: patch step failed"
49
 
50
+ RUN chmod +x /app/entrypoint.sh /app/security-check.sh /app/diagnose.sh && \
 
51
  mkdir -p /home/user && \
52
  chown -R node:node /home/user && \
53
+ chown node:node /app/entrypoint.sh /app/security-check.sh /app/diagnose.sh /app/openclaw-template.json /app/spaces/huggingface/setup-hf-config.mjs
 
 
 
 
54
 
55
  USER node
56