message: Improve apprepository-controller build time
  See
diff: +# syntax = docker/dockerfile:experimental
  +
  FROM golang:1.13 as builder
  -COPY . /go/src/github.com/kubeapps/kubeapps
  WORKDIR /go/src/github.com/kubeapps/kubeapps
  -RUN CGO_ENABLED=0 go build -a -installsuffix cgo ./cmd/apprepository-controller
  +COPY go.mod go.sum ./
  +COPY vendor vendor
  +COPY pkg pkg
  +COPY cmd cmd
  +# With the trick below, Go's build cache is kept between builds.
  +# https://github.com/golang/go/issues/27719#issuecomment-514747274
  +RUN --mount=type=cache,target=/go/pkg/mod \
  + --mount=type=cache,target=/root/.cache/go-build \
  + CGO_ENABLED=0 go build -installsuffix cgo ./cmd/apprepository-controller
  FROM scratch
  COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
  