This repository has been archived on 2026-02-01. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
clawdbot_build/Dockerfile
Aydent 8190be4d2f
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 12m31s
Fix: Clone moltbot repo and install Bun in Dockerfile
2026-01-28 22:36:10 +01:00

48 lines
975 B
Docker

FROM node:22-bookworm
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
git \
python3 \
make \
g++ \
socat \
unzip \
&& rm -rf /var/lib/apt/lists/*
# Install Bun (required for build scripts)
RUN curl -fsSL https://bun.sh/install | bash
ENV BUN_INSTALL="/root/.bun"
ENV PATH="${BUN_INSTALL}/bin:${PATH}"
# Enable pnpm
RUN corepack enable
WORKDIR /home/node/app
# Clone the official repository
# We clone into the current directory
RUN git clone https://github.com/moltbot/moltbot.git .
# Install dependencies
RUN pnpm install --frozen-lockfile
# Build application
RUN CLAWDBOT_A2UI_SKIP_MISSING=1 pnpm build
# Build UI
# Force pnpm for UI build as per official Dockerfile
ENV CLAWDBOT_PREFER_PNPM=1
RUN pnpm ui:install
RUN pnpm ui:build
# Fix permissions for the node user
RUN chown -R node:node /home/node/app
# Security: Run as non-root
USER node
# Start the application
CMD ["node", "dist/index.js"]