sungrow/Dockerfile
2024-07-08 20:04:45 +10:00

12 lines
No EOL
327 B
Docker

FROM golang:latest AS builder
WORKDIR /go/src/sungrow
COPY . .
RUN --mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/root/go/pkg/mod \
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"]