mirror of
https://github.com/Threnklyn/wg-ui.git
synced 2026-06-07 22:13:32 +02:00
Simplify Dockerfile a bit, but retaining module caching layer
This commit is contained in:
+3
-5
@@ -1,13 +1,11 @@
|
|||||||
FROM golang:1.12 AS build_deps
|
FROM golang:1.12 AS build
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
COPY go.mod .
|
COPY go.mod .
|
||||||
COPY go.sum .
|
COPY go.sum .
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
|
|
||||||
FROM build_deps AS build
|
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go install -a -tags netgo -ldflags '-w -extldflags "-static"' .
|
RUN go install .
|
||||||
|
|
||||||
FROM gcr.io/distroless/base:debug
|
FROM gcr.io/distroless/base:latest
|
||||||
COPY --from=build /build/wireguard-ui /
|
COPY --from=build /build/wireguard-ui /
|
||||||
ENTRYPOINT [ "/wireguard-ui" ]
|
ENTRYPOINT [ "/wireguard-ui" ]
|
||||||
|
|||||||
Reference in New Issue
Block a user