diff --git a/Dockerfile b/Dockerfile index 9c6aa7036..66a3dc7a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,6 +35,13 @@ ENV NODE_ENV=production # Security hardening: Run as non-root user # The node:22-bookworm image includes a 'node' user (uid 1000) # This reduces the attack surface by preventing container escape via root privileges +# Expose moltbot CLI globally (use root entrypoint, pnpm-safe) + +RUN printf '#!/bin/sh\nexec node /app/moltbot.mjs "$@"\n' \ + > /usr/local/bin/moltbot \ + && chmod +x /usr/local/bin/moltbot + + USER node CMD ["node", "dist/index.js"]