-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathDockerfile.openclaw
More file actions
55 lines (40 loc) · 1.32 KB
/
Dockerfile.openclaw
File metadata and controls
55 lines (40 loc) · 1.32 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
# OpenClaw Docker Image
# Based on official OpenClaw documentation: https://docs.openclaw.ai/install/docker
FROM node:22-bookworm
# Install Bun (required for OpenClaw build scripts)
RUN curl -fsSL https://bun.sh/install | bash
ENV PATH="/root/.bun/bin:${PATH}"
# Enable pnpm
RUN corepack enable
# Set working directory
WORKDIR /app
# Clone OpenClaw repository
RUN git clone https://github.com/openclaw/openclaw.git . && \
git checkout main
# Install dependencies
RUN pnpm install --frozen-lockfile
# Build OpenClaw
RUN pnpm build && \
pnpm ui:install && \
pnpm ui:build
# Install Python and Aider for AI coding assistance
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
python3-venv \
&& rm -rf /var/lib/apt/lists/*
# Install Aider
RUN pip3 install --no-cache-dir --break-system-packages aider-chat
# Verify aider installation
RUN aider --version
# Set production environment
ENV NODE_ENV=production
# Create default directories
RUN mkdir -p /home/node/.openclaw/workspace/skills
# Expose gateway port
EXPOSE 18789
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD node dist/index.js health || exit 1
# Default command (will be overridden by docker-compose)
CMD ["node", "dist/index.js", "gateway", "--port", "18789", "--bind", "0.0.0.0"]