2ch commited on
Commit
0efe9dd
·
verified ·
1 Parent(s): 99f5d29

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -7
Dockerfile CHANGED
@@ -3,15 +3,24 @@ WORKDIR /app
3
  RUN pacman -Syu --noconfirm && \
4
  pacman -S --noconfirm curl git bun && \
5
  pacman -Scc --noconfirm && \
6
- mkdir -p /opt/windsurf/data/db && git clone --depth 1 https://github.com/dwgx/WindsurfAPI.git . && bash install-ls.sh && \
7
- cat > /app/resolv.conf << 'EOF'
 
 
 
8
  nameserver 1.1.1.1
9
  nameserver 1.0.0.1
10
  nameserver 2606:4700:4700::1111
11
- nameserver 2606:4700:4700::1002"
12
- EOF \
13
- echo -e '#!/bin/sh\nmv /app/resolv.conf /etc/resolv.conf\nexec "$@"\n' > /entrypoint.sh && chmod +x /entrypoint.sh && \
14
- cat > .env << 'EOF'
 
 
 
 
 
 
15
  PORT=7860
16
  HOST=127.0.0.1
17
  DEFAULT_MODEL=gemini-2.5-flash
@@ -21,6 +30,10 @@ LS_PORT=42100
21
  DASHBOARD_PASSWORD=
22
  API_KEY=
23
  EOF
24
- RUN cat /app/resolv.conf && echo -e "\n===================\n" && cat /entrypoint.sh && echo -e "\n===================\n" && cat /app/.env
 
 
 
 
25
  ENTRYPOINT ["/entrypoint.sh"]
26
  CMD ["bun", "/app/src/index.js"]
 
3
  RUN pacman -Syu --noconfirm && \
4
  pacman -S --noconfirm curl git bun && \
5
  pacman -Scc --noconfirm && \
6
+ mkdir -p /opt/windsurf/data/db && \
7
+ git clone --depth 1 https://github.com/dwgx/WindsurfAPI.git . && \
8
+ bash install-ls.sh
9
+
10
+ COPY <<-"EOF" /app/resolv.conf
11
  nameserver 1.1.1.1
12
  nameserver 1.0.0.1
13
  nameserver 2606:4700:4700::1111
14
+ nameserver 2606:4700:4700::1002
15
+ EOF
16
+
17
+ COPY --chmod=755 <<-"EOF" /entrypoint.sh
18
+ #!/bin/sh
19
+ mv /app/resolv.conf /etc/resolv.conf
20
+ exec "$@"
21
+ EOF
22
+
23
+ COPY <<-"EOF" /app/.env
24
  PORT=7860
25
  HOST=127.0.0.1
26
  DEFAULT_MODEL=gemini-2.5-flash
 
30
  DASHBOARD_PASSWORD=
31
  API_KEY=
32
  EOF
33
+
34
+ RUN cat /app/resolv.conf && echo -e "\n===================\n" && \
35
+ cat /entrypoint.sh && echo -e "\n===================\n" && \
36
+ cat /app/.env
37
+
38
  ENTRYPOINT ["/entrypoint.sh"]
39
  CMD ["bun", "/app/src/index.js"]