Update Dockerfile

This commit is contained in:
Meng Sen 2024-10-08 10:24:43 +08:00 committed by GitHub
parent 4f1f5db75b
commit 8fe292ebd0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,6 +5,14 @@ RUN go get -d -v ./
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o deeplx . RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o deeplx .
FROM alpine:latest FROM alpine:latest
ENV TZ Asia/Shanghai
RUN apk add --no-cache tzdata \
&& ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
&& echo $TZ > /etc/timezone \
EXPOSE 1188
WORKDIR /app WORKDIR /app
COPY --from=builder /go/src/github.com/OwO-Network/DeepLX/deeplx /app/deeplx COPY --from=builder /go/src/github.com/OwO-Network/DeepLX/deeplx /app/deeplx
CMD ["/app/deeplx"] CMD ["/app/deeplx"]