mirror of
https://github.com/Threnklyn/wg-ui.git
synced 2026-05-19 05:13:30 +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
|
||||
COPY go.mod .
|
||||
COPY go.sum .
|
||||
RUN go mod download
|
||||
|
||||
FROM build_deps AS build
|
||||
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 /
|
||||
ENTRYPOINT [ "/wireguard-ui" ]
|
||||
|
||||
Reference in New Issue
Block a user