jammss commited on
Commit
2013feb
1 Parent(s): e0604f8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -7
Dockerfile CHANGED
@@ -1,8 +1,19 @@
1
- FROM python:3.9
2
- WORKDIR /app
3
  RUN apt-get update && apt-get install -y git
4
- RUN git clone https://github.com/modenwenda/Telegram-Chatbot-Gpt4Free
5
- RUN pip install hnswlib
6
- RUN pip install -r requirements.txt
7
- EXPOSE 80
8
- CMD ["python", "main.py"]
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM rust:1.65 as builder
 
2
  RUN apt-get update && apt-get install -y git
3
+ RUN git clone https://github.com/fuergaosi233/chatgpt-proxy-server.git
4
+ RUN cargo new --bin app
5
+ WORKDIR /app
6
+ COPY Cargo.toml Cargo.toml
7
+ # Dry running build command to make Docker cache layer
8
+ RUN cargo build --release
9
+ RUN rm src/*.rs
10
+
11
+ COPY src src
12
+ RUN cargo build --release
13
+
14
+ # Use slim image to place build result
15
+ FROM debian:stable-slim
16
+ RUN apt-get update && apt-get install -y ca-certificates
17
+ COPY --from=builder ./app/target/release/chatgpt-proxy-server .
18
+ EXPOSE 3000
19
+ CMD ["./chatgpt-proxy-server"]