2020-05-17 12:25:46 +00:00
|
|
|
FROM golang@sha256:cee6f4b901543e8e3f20da3a4f7caac6ea643fd5a46201c3c2387183a332d989 AS builder
|
|
|
|
RUN apk update && apk add --no-cache git make ca-certificates && update-ca-certificates
|
2020-05-19 10:56:40 +00:00
|
|
|
COPY cmd /go/src/git.martyn.berlin/martyn/LEDController/cmd/
|
2020-05-17 12:25:46 +00:00
|
|
|
COPY internal/ /go/src/git.martyn.berlin/martyn/LEDController/internal/
|
|
|
|
COPY Makefile /go/src/git.martyn.berlin/martyn/LEDController/
|
|
|
|
RUN cd /go/src/git.martyn.berlin/martyn/LEDController/; make deps ; make static
|
|
|
|
|
|
|
|
FROM scratch
|
|
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
2020-05-19 11:01:46 +00:00
|
|
|
COPY --from=builder /go/src/git.martyn.berlin/martyn/LEDController/ledcontroller-server /app/
|
2020-05-17 12:25:46 +00:00
|
|
|
WORKDIR /app
|
2020-05-19 11:05:13 +00:00
|
|
|
CMD ["/app/ledcontroller-server"]
|