ykl45 commited on
Commit
17c0f65
1 Parent(s): e657f45

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -0
Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM golang:1.21 AS builder
2
+
3
+ ENV CGO_ENABLED=0
4
+
5
+ ENV SERVER_PORT=7860
6
+
7
+ RUN apt-get update && apt-get install -y git
8
+
9
+ RUN git clone https://github.com/renqabs/Da.git /app
10
+
11
+ WORKDIR /app
12
+
13
+ RUN go mod download
14
+
15
+ RUN go build -ldflags "-s -w" -o /app/duck2api .
16
+
17
+ FROM alpine:latest
18
+
19
+ WORKDIR /app
20
+ RUN apk add --no-cache tzdata
21
+ COPY --from=builder /app/aurora /app/duck2api
22
+
23
+ EXPOSE 7860
24
+
25
+ CMD ["./duck2api"]