Update Dockerfile
Browse files- Dockerfile +3 -6
Dockerfile
CHANGED
@@ -19,13 +19,10 @@ RUN apk add --no-cache git
|
|
19 |
RUN git clone https://github.com/deanxv/genspark2api.git .
|
20 |
|
21 |
|
22 |
-
#
|
23 |
-
|
24 |
-
#ENV GOPROXY=https://goproxy.cn,direct
|
25 |
-
RUN go mod download
|
26 |
|
27 |
-
#
|
28 |
-
COPY . .
|
29 |
RUN go build -o /genspark2api
|
30 |
|
31 |
# 使用 Alpine 镜像作为最终镜像
|
|
|
19 |
RUN git clone https://github.com/deanxv/genspark2api.git .
|
20 |
|
21 |
|
22 |
+
# 直接执行依赖下载
|
23 |
+
RUN go mod download
|
|
|
|
|
24 |
|
25 |
+
# 不需要再COPY . . 因为文件已经通过git clone获取了
|
|
|
26 |
RUN go build -o /genspark2api
|
27 |
|
28 |
# 使用 Alpine 镜像作为最终镜像
|