shivamkr00902 commited on
Commit
3566f11
·
verified ·
1 Parent(s): 8bd75b3

Run pinned OpenClaw Telethon migration

Browse files

Build the reviewed fork, install the Python Telethon worker in its own virtual environment, and run its tests during the image build. Preserve the existing startup script, reverse proxy, user and ports.

Files changed (1) hide show
  1. Dockerfile +19 -3
Dockerfile CHANGED
@@ -14,10 +14,25 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
14
 
15
  # 2. Force Git to use HTTPS instead of SSH for npm sub-dependencies
16
  RUN git config --global url."https://github.com/".insteadOf "ssh://git@github.com/" && \
17
- git config --global url."https://github.com/".insteadOf "git@github.com:"
18
 
19
- # 3. Install OpenClaw globally (now runs on Node 24 LTS)
20
- RUN npm install -g openclaw@2026.10.3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
  # 4. Prepare directories & permissions for Hugging Face UID 1000
23
  RUN mkdir -p /home/node/.openclaw/workspace && \
@@ -34,6 +49,7 @@ ENV HOME=/home/node \
34
  OPENCLAW_STATE_DIR=/home/node/.openclaw \
35
  OPENCLAW_WORKSPACE_DIR=/home/node/.openclaw/workspace \
36
  OPENCLAW_GATEWAY_PORT=18789 \
 
37
  PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium \
38
  NODE_ENV=production
39
 
 
14
 
15
  # 2. Force Git to use HTTPS instead of SSH for npm sub-dependencies
16
  RUN git config --global url."https://github.com/".insteadOf "ssh://git@github.com/" && \
17
+ git config --global --add url."https://github.com/".insteadOf "git@github.com:"
18
 
19
+ # 3. Build the pinned OpenClaw Telethon migration instead of the npm release.
20
+ ARG OPENCLAW_REF=f0b4a9f7ce9e869f43998d75e5fc8cb7856ccb24
21
+ COPY --from=oven/bun:1.4.3 /usr/local/bin/bun /usr/local/bin/bun
22
+ RUN git init /opt/openclaw && \
23
+ git -C /opt/openclaw remote add origin https://github.com/ArnavSingh76533/openclaw-for-telethon.git && \
24
+ git -C /opt/openclaw fetch --depth 1 origin "$OPENCLAW_REF" && \
25
+ git -C /opt/openclaw checkout --detach FETCH_HEAD
26
+ RUN corepack enable && \
27
+ cd /opt/openclaw && \
28
+ NODE_OPTIONS=--max-old-space-size=2048 pnpm install --frozen-lockfile && \
29
+ NODE_OPTIONS=--max-old-space-size=8192 pnpm build:runtime && \
30
+ test -f dist/extensions/telegram/python/openclaw_telethon/service.py && \
31
+ ln -s /opt/openclaw/openclaw.mjs /usr/local/bin/openclaw && \
32
+ openclaw --version
33
+ RUN python3 -m venv /opt/telethon && \
34
+ /opt/telethon/bin/python -m pip install --no-cache-dir /opt/openclaw/extensions/telegram/python && \
35
+ /opt/telethon/bin/python -m unittest discover -s /opt/openclaw/extensions/telegram/python/tests -v
36
 
37
  # 4. Prepare directories & permissions for Hugging Face UID 1000
38
  RUN mkdir -p /home/node/.openclaw/workspace && \
 
49
  OPENCLAW_STATE_DIR=/home/node/.openclaw \
50
  OPENCLAW_WORKSPACE_DIR=/home/node/.openclaw/workspace \
51
  OPENCLAW_GATEWAY_PORT=18789 \
52
+ OPENCLAW_TELETHON_PYTHON=/opt/telethon/bin/python \
53
  PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium \
54
  NODE_ENV=production
55