Skip to content

Instantly share code, notes, and snippets.

@Melvynx
Created February 2, 2026 13:49
Show Gist options
  • Select an option

  • Save Melvynx/6994ef7d1118064f31184fc820072541 to your computer and use it in GitHub Desktop.

Select an option

Save Melvynx/6994ef7d1118064f31184fc820072541 to your computer and use it in GitHub Desktop.
OpenClaw Dockerfile fix
FROM node:22-bookworm
RUN apt-get update && apt-get install -y socat curl git && apt-get clean
RUN curl -fsSL https://bun.sh/install | bash && cp /root/.bun/bin/bun /usr/local/bin/bun && chmod +x /usr/local/bin/bun
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& apt update && apt install -y gh && apt-get clean
RUN curl -fsSL https://claude.ai/install.sh | bash
ENV PATH="/root/.local/bin:${PATH}"
RUN printf '#!/bin/bash\nexec script -q -c "claude $*" /dev/null\n' > /usr/local/bin/claude-run && chmod +x /usr/local/bin/claude-run
RUN npm install -g ccusage
WORKDIR /app
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc ./
COPY ui/package.json ./ui/package.json
COPY scripts ./scripts
RUN corepack enable
RUN pnpm install --frozen-lockfile
COPY . .
RUN OPENCLAW_A2UI_SKIP_MISSING=1 pnpm build
RUN pnpm ui:install
RUN pnpm ui:build
RUN mkdir -p /home/node/.local/bin /home/node/.local/share /home/node/.config /home/node/.claude && chown -R node:node /home/node
RUN cp -r /root/.local/share/claude /home/node/.local/share/ && chown -R node:node /home/node/.local/share/claude
RUN ln -sf /home/node/.local/share/claude/versions/*/claude /home/node/.local/bin/claude
ENV NODE_ENV=production
CMD ["node","dist/index.js"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment