Update Dockerfile
Browse files- Dockerfile +4 -12
Dockerfile
CHANGED
|
@@ -1,22 +1,14 @@
|
|
| 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
|
| 6 |
-
WORKDIR /DeepLX
|
| 7 |
-
|
| 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 /
|
| 20 |
|
| 21 |
EXPOSE 1188
|
| 22 |
|
|
|
|
|
|
|
|
|
|
| 1 |
FROM golang:1.22 AS builder
|
| 2 |
+
WORKDIR /build
|
| 3 |
RUN apt install -y git && \
|
| 4 |
git clone https://github.com/OwO-Network/DeepLX.git
|
| 5 |
+
WORKDIR /build/DeepLX
|
| 6 |
+
RUN go mod download
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o deeplx .
|
| 8 |
|
| 9 |
FROM alpine:latest
|
| 10 |
WORKDIR /app
|
| 11 |
+
COPY --from=builder /build/DeepLX/deeplx /app/deeplx
|
| 12 |
|
| 13 |
EXPOSE 1188
|
| 14 |
|