forked from cloudflare/moltworker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
52 lines (43 loc) · 1.9 KB
/
Dockerfile
File metadata and controls
52 lines (43 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM docker.io/cloudflare/sandbox:0.7.0
# Install Node.js 22 (required by clawdbot) and rsync (for R2 backup sync)
# The base image has Node 20, we need to replace it with Node 22
# Using direct binary download for reliability
ENV NODE_VERSION=22.13.1
RUN ARCH="$(dpkg --print-architecture)" \
&& case "${ARCH}" in \
amd64) NODE_ARCH="x64" ;; \
arm64) NODE_ARCH="arm64" ;; \
*) echo "Unsupported architecture: ${ARCH}" >&2; exit 1 ;; \
esac \
&& apt-get update && apt-get install -y xz-utils ca-certificates rsync \
&& curl -fsSLk https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-${NODE_ARCH}.tar.xz -o /tmp/node.tar.xz \
&& tar -xJf /tmp/node.tar.xz -C /usr/local --strip-components=1 \
&& rm /tmp/node.tar.xz \
&& node --version \
&& npm --version
# Install pnpm globally
RUN npm install -g pnpm
# Install moltbot (upstream binary/package is still named clawdbot).
# Create an `openclaw` wrapper symlink so user-facing surfaces can avoid the clawdbot name.
# Pin to specific version for reproducible builds.
RUN npm install -g clawdbot@2026.1.24-3 \
&& clawdbot --version \
&& ln -sf "$(command -v clawdbot)" /usr/local/bin/openclaw
# Create moltbot directories (paths still use clawdbot until upstream renames)
# Templates are stored in /root/.clawdbot-templates for initialization
RUN mkdir -p /root/.clawdbot \
&& mkdir -p /root/.clawdbot-templates \
&& mkdir -p /root/clawd \
&& mkdir -p /root/clawd/skills
# Copy startup script
# Build cache bust: 2026-01-28-v26-browser-skill
COPY start-moltbot.sh /usr/local/bin/start-moltbot.sh
RUN chmod +x /usr/local/bin/start-moltbot.sh
# Copy default configuration template
COPY moltbot.json.template /root/.clawdbot-templates/moltbot.json.template
# Copy custom skills
COPY skills/ /root/clawd/skills/
# Set working directory
WORKDIR /root/clawd
# Expose the gateway port
EXPOSE 18789