Merge pull request #9 from sbilly/patch-1

Create Dockerfile
This commit is contained in:
Vincent Young 2023-02-28 16:22:56 +08:00 committed by GitHub
commit 01f30e033e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
# syntax=docker/dockerfile:1
FROM golang:1.19 AS builder
WORKDIR /go/src/github.com/OwO-Network/DeepLX
COPY main.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"]