Add initial Dockerfile

This commit is contained in:
Daniel Lundin
2019-05-20 12:02:56 +02:00
parent af93e9667e
commit 5634e244ad
+13
View File
@@ -0,0 +1,13 @@
FROM golang:1.12 AS build_deps
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"' .
FROM gcr.io/distroless/base:debug
COPY --from=build /build/wireguard-ui /
ENTRYPOINT [ "/wireguard-ui" ]