| FROM node:22-bookworm |
|
|
| RUN curl -fsSL https://bun.sh/install | bash |
| ENV PATH="/root/.bun/bin:${PATH}" |
| RUN corepack enable |
|
|
| WORKDIR /app |
|
|
|
|
| RUN apt-get update && \ |
| DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ |
| git \ |
| curl \ |
| ca-certificates \ |
| && apt-get clean && \ |
| rm -rf /var/lib/apt/lists/* |
|
|
| RUN git clone https://github.com/openclaw/openclaw.git . |
|
|
|
|
| RUN pnpm install --frozen-lockfile |
|
|
|
|
| RUN OPENCLAW_A2UI_SKIP_MISSING=1 pnpm build |
| ENV OPENCLAW_PREFER_PNPM=1 |
| RUN pnpm ui:build |
|
|
|
|
| RUN mkdir -p /home/node/.openclaw |
|
|
|
|
| COPY openclaw.json /home/node/.openclaw/openclaw.json |
|
|
| RUN mkdir -p /home/node/.openclaw/nodes |
| RUN echo '{"silent": true}' > /home/node/.openclaw/nodes/pending.json |
| RUN echo '{"devices": []}' > /home/node/.openclaw/nodes/paired.json |
|
|
| RUN chown -R 1000:1000 /app /home/node/.openclaw |
|
|
| USER 1000 |
|
|
| ENV NODE_ENV=production |
| ENV PORT=7860 |
|
|
| EXPOSE 7860 |
|
|
| CMD ["node", "dist/index.js", "gateway", "--allow-unconfigured", "--bind", "lan", "--port", "7860"] |