This commit is contained in:
saianilsingi 2026-01-30 17:45:19 +02:00 committed by GitHub
commit ff4d56c59f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -34,6 +34,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"]