AISimplyExplained commited on
Commit
ffd1488
·
verified ·
1 Parent(s): 01699e4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -2
Dockerfile CHANGED
@@ -1,4 +1,28 @@
1
- FROM ghcr.io/imputnet/cobalt:11
2
- ENV API_URL=https://AISimplyExplained-test.hf.space/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ENV API_PORT=7860
4
  EXPOSE 7860
 
 
1
+ # Stage 1: grab cobalt's built app
2
+ FROM ghcr.io/imputnet/cobalt:11 AS cobalt
3
+
4
+ # Stage 2: Debian base (required for Cloudflare WARP)
5
+ FROM debian:bookworm-slim
6
+
7
+ # Node.js 20 + Cloudflare WARP
8
+ RUN apt-get update && apt-get install -y --no-install-recommends curl gpg ca-certificates && \
9
+ curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
10
+ apt-get install -y --no-install-recommends nodejs && \
11
+ curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | \
12
+ gpg --dearmor -o /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg && \
13
+ echo "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] \
14
+ https://pkg.cloudflareclient.com/ bookworm main" | \
15
+ tee /etc/apt/sources.list.d/cloudflare-client.list && \
16
+ apt-get update && apt-get install -y --no-install-recommends cloudflare-warp && \
17
+ rm -rf /var/lib/apt/lists/*
18
+
19
+ # Copy cobalt app from official image
20
+ COPY --from=cobalt /app /app
21
+ WORKDIR /app
22
+
23
+ COPY start.sh /start.sh
24
+ RUN chmod +x /start.sh
25
+
26
  ENV API_PORT=7860
27
  EXPOSE 7860
28
+ CMD ["/start.sh"]