webhook-freedns/Dockerfile
James Munnelly 3935fd70e7 Update Helm chart and Dockerfile
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-04-29 17:55:46 +01:00

26 lines
412 B
Docker

FROM golang:1.12.4-alpine AS build_deps
RUN apk add --no-cache git
WORKDIR /workspace
ENV GO111MODULE=on
COPY go.mod .
COPY go.sum .
RUN go mod download
FROM build_deps AS build
COPY . .
RUN CGO_ENABLED=0 go build -o webhook -ldflags '-w -extldflags "-static"' .
FROM alpine:3.9
RUN apk add --no-cache ca-certificates
COPY --from=build /workspace/webhook /usr/local/bin/webhook
ENTRYPOINT ["webhook"]