-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathDockerfile.openclaw
More file actions
62 lines (52 loc) · 2.63 KB
/
Dockerfile.openclaw
File metadata and controls
62 lines (52 loc) · 2.63 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
53
54
55
56
57
58
59
60
61
62
# Pull node:22-slim via Google's Docker Hub mirror to avoid Docker Hub
# anonymous-pull rate limits in CI. mirror.gcr.io is a free, no-auth
# pull-through cache for `library/*` images on Docker Hub.
FROM mirror.gcr.io/library/node:22-slim
# python3 + build-essential are needed for native npm modules (better-sqlite3
# in pinchy-files) to compile from source when the prebuilt binary doesn't
# match the current node:22-slim point release. Without them the image build
# fails intermittently whenever the upstream base image bumps Node.js.
RUN apt-get update && apt-get install -y \
git \
inotify-tools \
procps \
python3 \
build-essential \
&& rm -rf /var/lib/apt/lists/*
RUN npm install -g openclaw@2026.4.12
# Install pinchy-files plugin dependencies (native modules must be built in the container)
COPY packages/plugins/pinchy-files/package.json /tmp/pinchy-files/package.json
RUN cd /tmp/pinchy-files && npm install --omit=dev && \
mkdir -p /opt/pinchy-files-deps && \
cp -r /tmp/pinchy-files/node_modules /opt/pinchy-files-deps/ && \
rm -rf /tmp/pinchy-files
# Install pinchy-odoo plugin dependencies
COPY packages/plugins/pinchy-odoo/package.json /tmp/pinchy-odoo/package.json
RUN cd /tmp/pinchy-odoo && npm install --omit=dev && \
mkdir -p /opt/pinchy-odoo-deps && \
cp -r /tmp/pinchy-odoo/node_modules /opt/pinchy-odoo-deps/ && \
rm -rf /tmp/pinchy-odoo
# Install pinchy-web plugin dependencies
COPY packages/plugins/pinchy-web/package.json /tmp/pinchy-web/package.json
RUN cd /tmp/pinchy-web && npm install --omit=dev && \
mkdir -p /opt/pinchy-web-deps && \
cp -r /tmp/pinchy-web/node_modules /opt/pinchy-web-deps/ && \
rm -rf /tmp/pinchy-web
# Install pinchy-email plugin dependencies
COPY packages/plugins/pinchy-email/package.json /tmp/pinchy-email/package.json
RUN cd /tmp/pinchy-email && npm install --omit=dev && \
mkdir -p /opt/pinchy-email-deps && \
cp -r /tmp/pinchy-email/node_modules /opt/pinchy-email-deps/ && \
rm -rf /tmp/pinchy-email
COPY config/openclaw.json /root/.openclaw/openclaw.json
COPY config/ensure-gateway-token.js /ensure-gateway-token.js
COPY config/start-openclaw.sh /start-openclaw.sh
RUN chmod +x /start-openclaw.sh
# Bake Pinchy's user-facing docs into the image so Smithers' docs_list /
# docs_read tools (pinchy-docs plugin) work in every deploy. Previously
# this path came from a relative bind-mount in docker-compose.yml, which
# only exists when the full repo is checked out next to compose.yml —
# broken for every clean end-user install (cloud-init, curl-and-go).
COPY docs/src/content/docs /pinchy-docs
EXPOSE 18789
CMD ["/start-openclaw.sh"]