File size: 935 Bytes
8543d15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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"]