# Use Node.js 22 (Official Image) FROM node:22-bullseye # 1. Install utilities & Ollama # Added 'zstd' to fix the "extraction failed" error you saw earlier RUN apt-get update && apt-get install -y curl git sudo zstd \ && curl -fsSL https://ollama.com/install.sh | sh # 2. Install VS Code Server RUN curl -fsSL https://code-server.dev/install.sh | sh # 3. Install Clawdbot (Run as root) RUN npm install -g clawdbot # 4. Permission Fix: Allow 'node' user to use sudo RUN echo "node ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/node \ && chmod 0440 /etc/sudoers.d/node # 5. Switch to the existing user 'node' USER node ENV HOME=/home/node WORKDIR $HOME # 6. SECURITY: Set your VS Code Password # Change this to something only you know ENV PASSWORD=mypassword123 # 7. Expose Port EXPOSE 7860 # 8. Start Command # We use a single line to ensure both services stay alive CMD ollama serve > /tmp/ollama.log 2>&1 & \ code-server --bind-addr 0.0.0.0:7860 --auth password