-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
71 lines (58 loc) · 1.77 KB
/
Dockerfile
File metadata and controls
71 lines (58 loc) · 1.77 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
63
64
65
66
67
68
69
70
71
# openclaw docker image
# runs the openclaw personal AI assistant with python, npm, npx, git, and browser support
FROM node:22-bookworm
# install system packages: python, git, chromium, and other essentials
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3 \
python3-pip \
python3-venv \
git \
curl \
ca-certificates \
build-essential \
chromium \
chromium-sandbox \
fonts-liberation \
libasound2 \
libatk-bridge2.0-0 \
libatk1.0-0 \
libcups2 \
libdbus-1-3 \
libdrm2 \
libgbm1 \
libgtk-3-0 \
libnspr4 \
libnss3 \
libxcomposite1 \
libxdamage1 \
libxfixes3 \
libxkbcommon0 \
libxrandr2 \
xdg-utils \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# symlink python3 to python for convenience
RUN ln -sf /usr/bin/python3 /usr/bin/python
# install openclaw globally via npm (includes npx)
RUN npm install -g openclaw@latest
# install playwright browsers for browser automation
ENV PLAYWRIGHT_BROWSERS_PATH=/home/node/.cache/ms-playwright
RUN npx playwright install chromium && npx playwright install-deps chromium
# set chromium path for puppeteer/playwright
ENV CHROME_PATH=/usr/bin/chromium
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
# set working directory
WORKDIR /home/node
# create directories for config and workspace
RUN mkdir -p /home/node/.openclaw /home/node/.openclaw/workspace /home/node/.openclaw/credentials
ENV NODE_ENV=production
ENV HOME=/home/node
# allow non-root user to write
RUN chown -R node:node /home/node
# run as non-root user (uid 1000)
USER node
# expose gateway port
EXPOSE 18789 18790
# start the gateway
CMD ["openclaw", "gateway", "--allow-unconfigured", "--bind", "lan", "--port", "18789"]