mirror of
https://github.com/OwO-Network/DeepLX.git
synced 2024-11-16 04:32:19 +08:00
19 lines
434 B
Docker
19 lines
434 B
Docker
# syntax=docker/dockerfile:1
|
|
|
|
FROM golang:1.22 AS builder
|
|
WORKDIR /go/src/github.com/OwO-Network/DeepLX
|
|
COPY main.go ./
|
|
COPY types.go ./
|
|
COPY utils.go ./
|
|
COPY config.go ./
|
|
COPY translate.go ./
|
|
COPY go.mod ./
|
|
COPY go.sum ./
|
|
RUN go get -d -v ./
|
|
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o deeplx .
|
|
|
|
FROM alpine:latest
|
|
WORKDIR /app
|
|
COPY --from=builder /go/src/github.com/OwO-Network/DeepLX/deeplx /app/deeplx
|
|
CMD ["/app/deeplx"]
|