webhook/Dockerfile
Nicolas Vanheuverzwijn f1c1110f20 docker: add Dockerfile and .dockerignore.
The Dockerfile produces a scratch image with a statically linked binary without debug flag.
2020-10-02 11:37:34 -04:00

9 lines
236 B
Docker

FROM golang:1.15 AS builder
WORKDIR /go/src/github.com/adnanh/webhook/
COPY . ./
RUN make CGO_ENABLED=0 LDFLAGS="-w -s" build
FROM scratch
COPY --from=builder /go/src/github.com/adnanh/webhook/webhook /bin/
ENTRYPOINT ["/bin/webhook"]