webhook-freedns/Dockerfile
Jake Sanders 1f895be0fe
Tidy example package
Signed-off-by: Jake Sanders <i@am.so-aweso.me>
2021-02-22 16:02:41 +00:00

25 lines
391 B
Docker

FROM golang:1.16-alpine AS build_deps
RUN apk add --no-cache git
WORKDIR /workspace
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"]