sanbo110 commited on
Commit
8a6c45b
·
verified ·
1 Parent(s): 7cd35c9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -4
Dockerfile CHANGED
@@ -4,17 +4,18 @@ ENV CGO_ENABLED=0
4
 
5
  WORKDIR /app
6
 
 
7
  COPY go.mod go.sum ./
8
  RUN go mod download
9
 
10
  COPY . .
11
- RUN CGO_ENABLED=0 GOARCH=amd64 go build -o ddg .
12
 
13
  FROM alpine:latest
14
 
15
  WORKDIR /app
16
 
17
- COPY --from=builder /app/ddg .
18
 
19
  ENV MAX_RETRY_COUNT="3"
20
  ENV RETRY_DELAY="5000"
@@ -22,6 +23,6 @@ ENV PORT="7860"
22
 
23
  EXPOSE 7860
24
 
25
- RUN chmod +x ddg
26
 
27
- CMD ["./ddg"]
 
4
 
5
  WORKDIR /app
6
 
7
+ RUN go mod tidy
8
  COPY go.mod go.sum ./
9
  RUN go mod download
10
 
11
  COPY . .
12
+ RUN CGO_ENABLED=0 GOARCH=amd64 go build -o test .
13
 
14
  FROM alpine:latest
15
 
16
  WORKDIR /app
17
 
18
+ COPY --from=builder /app/test .
19
 
20
  ENV MAX_RETRY_COUNT="3"
21
  ENV RETRY_DELAY="5000"
 
23
 
24
  EXPOSE 7860
25
 
26
+ RUN chmod +x test
27
 
28
+ CMD ["./test"]