8e commited on
Commit
af03eb3
·
verified ·
1 Parent(s): 059ba54

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # syntax=docker/dockerfile:1
2
+
3
+ FROM golang:1.22 AS builder
4
+ RUN apt install -y git
5
+ git clone https://github.com/OwO-Network/DeepLX.git /go/src/github.com/OwO-Network/DeepLX
6
+ WORKDIR /go/src/github.com/OwO-Network/DeepLX
7
+ COPY main.go ./
8
+ COPY types.go ./
9
+ COPY utils.go ./
10
+ COPY config.go ./
11
+ COPY translate.go ./
12
+ COPY go.mod ./
13
+ COPY go.sum ./
14
+ RUN go get -d -v ./
15
+ RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o deeplx .
16
+
17
+ FROM alpine:latest
18
+ WORKDIR /app
19
+ COPY --from=builder /go/src/github.com/OwO-Network/DeepLX/deeplx /app/deeplx
20
+
21
+ EXPOSE 1188
22
+
23
+ CMD ["/app/deeplx"]