FROM golang:latest as builder
WORKDIR /go/src/sungrow
COPY . .

RUN CGO_ENABLED=0 go build -v -o sungrow .

FROM gcr.io/distroless/static:latest
COPY --from=builder /go/src/sungrow/sungrow /usr/bin/

CMD ["/usr/bin/sungrow"]