Files
Brancheneinstufung2/dockerfiles/Dockerfile.moltbot
Floke 680b237def refactor: [30388f42] Finale Komprimierung des Root-Verzeichnisses
- Konsolidiert Dockerfiles in .
- Verschiebt Datenbank- und Log-Dateien in .
- Organisiert Konfigurations- und Modelldateien in .
- Fasst Shell-Skripte in  zusammen.
- Verschiebt  nach .
- Verschiebt  nach .
- Das  Verzeichnis wurde in  verschoben.
- Behält Kern-Dateien (, , , ,  etc.) im Root-Verzeichnis, um die Lauffähigkeit zu gewährleisten.
2026-03-06 11:41:44 +00:00

37 lines
1.0 KiB
Docker

# Use Node.js v20 as the base image to match the Synology host environment
FROM node:20-slim
# Install git and pnpm as root
USER root
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
# Switch to the non-privileged node user for all subsequent operations
USER node
# Set the working directory
WORKDIR /app
# Clone the Moltbot repository
RUN git clone https://github.com/moltbot/moltbot.git .
# HACK: Use a brute-force find/sed to patch the Node.js version check in ANY file
RUN find . -type f -exec sed -i 's/.*requires Node >=.*/\/\/ Version check disabled by Gemini for Synology compatibility/' {} +
# Install pnpm locally as a project dependency
RUN npm install pnpm
# Install project dependencies using the local pnpm
RUN npx pnpm install
# Build the project
RUN npx pnpm build
# Expose the gateway port
EXPOSE 18789
# Set the entrypoint to the clawdbot executable
ENTRYPOINT ["/app/packages/clawdbot/node_modules/.bin/clawdbot"]
# The default command will be provided by docker-compose
CMD ["--help"]