FROM debian:bullseye-slim RUN apt-get update && apt-get install -y curl unzip git tmux sudo qrencode ripgrep nginx && rm -rf /var/lib/apt/lists/* RUN curl -Ls https://github.com/tsl0922/ttyd/releases/download/1.7.3/ttyd.x86_64 -o /usr/local/bin/ttyd && chmod +x /usr/local/bin/ttyd RUN useradd -m -s /bin/bash coder && echo "coder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers USER coder WORKDIR /home/coder RUN curl -fsSL https://bun.sh/install | bash ENV PATH="/home/coder/.bun/bin:${PATH}" RUN git clone --depth=1 https://github.com/Gitlawb/openclaude.git /home/coder/openclaude WORKDIR /home/coder/openclaude RUN bun install && bun run build COPY --chown=coder:coder start.sh /home/coder/start.sh COPY --chown=coder:coder nginx.conf /home/coder/nginx.conf RUN chmod +x /home/coder/start.sh USER root RUN cp /home/coder/nginx.conf /etc/nginx/sites-available/default && nginx -t USER coder EXPOSE 7860 CMD ["/home/coder/start.sh"]