FROM node:22-bookworm-slim ENV NODE_ENV=production \ # Persist state in HF persistent storage (enable it in Space settings) CLAWDBOT_STATE_DIR=/data \ # Make sure the gateway binds to the Space network CLAWDBOT_GATEWAY_PORT=7860 # Basic OS deps (ca-certs for HTTPS, tini as PID1) RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates tini bash \ && rm -rf /var/lib/apt/lists/* # Install Moltbot (package name is clawdbot) RUN npm i -g clawdbot@latest WORKDIR /app COPY entrypoint.sh /app/entrypoint.sh RUN chmod +x /app/entrypoint.sh EXPOSE 7860 ENTRYPOINT ["/usr/bin/tini", "--"] CMD ["/app/entrypoint.sh"]