This commit is contained in:
saianilsingi authored and GitHub committed 2026-01-30 17:45:19 +02:00
commit ff4d56c59f
1 file changed
+7
+7
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"]