stnh70 commited on
Commit
94582e2
·
verified ·
1 Parent(s): a3acf4c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -24
Dockerfile CHANGED
@@ -1,30 +1,16 @@
 
1
 
2
- FROM golang:latest
3
-
4
  WORKDIR /app
5
 
6
- # Install git
7
- RUN apt-get update && apt-get install -y git
8
-
9
- # Clone the repository
10
- RUN git clone https://github.com/yushangxiao/claude2api.git
11
- WORKDIR /app/claude2api
12
-
13
- # Build the binary
14
- RUN go build -o claude2api .
15
 
16
- # Set environment variables with default values that can be overridden
17
- ENV SESSIONS=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
18
- ENV APIKEY=197346
19
- ENV CHAT_DELETE=true
20
- ENV MAX_CHAT_HISTORY_LENGTH=10000
21
- ENV NO_ROLE_PREFIX=false
22
- ENV PROMPT_DISABLE_ARTIFACTS=true
23
- ENV ENABLE_MIRROR_API=false
24
- ENV MIRROR_API_PREFIX=
25
 
26
- # Expose the port
27
- EXPOSE 7860
28
 
29
- # Command to run when container starts
30
- CMD ["./claude2api"]
 
1
+ FROM denoland/deno:alpine
2
 
3
+ # 创建工作目录
 
4
  WORKDIR /app
5
 
6
+ # 复制所有文件
7
+ COPY . .
 
 
 
 
 
 
 
8
 
9
+ # 缓存主程序
10
+ RUN deno cache deno.ts
 
 
 
 
 
 
 
11
 
12
+ # 设置入口点,指向thunderapi子目录中的文件
13
+ ENTRYPOINT ["deno", "run", "--allow-net", "--allow-env", "--allow-read", "--allow-write", "thunderapi/thunderapi.ts"]
14
 
15
+ # Hugging Face Spaces使用7860端口
16
+ EXPOSE 7860