Commit 4f5ee750 authored by Geoff Simmons's avatar Geoff Simmons

Build the controller image so that 'mod download is usually cached.

Download modules when go.mod or go.sum change, not whenever any
source file changed.
parent 80728f19
......@@ -10,11 +10,13 @@ RUN mkdir -p /go/src/
WORKDIR /go/src/
COPY go.mod .
COPY go.sum .
RUN vgo mod download
COPY ./pkg/ /go/src/
COPY ./cmd/ /go/src/
COPY ./.git/ /go/src/
RUN vgo mod download
RUN vgo generate ./cmd/... && vgo build ./pkg/... ./cmd/... && \
CGO_ENABLED=0 GOOS=linux vgo build -o k8s-ingress cmd/*.go
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment