Merge "Speed-up building applier and clusterctl images"

This commit is contained in:
Zuul 2021-12-21 12:12:17 +00:00 committed by Gerrit Code Review
commit 220445cf80
3 changed files with 6 additions and 5 deletions

View File

@ -12,8 +12,9 @@ RUN update-ca-certificates
ENV PATH "/usr/local/go/bin:$PATH"
ENV CGO_ENABLED=0
WORKDIR /go/src/
COPY image/ .
COPY image/go.mod image/go.sum ./
RUN go mod download
COPY image/ ./
RUN go build -v -o /usr/local/bin/config-function ./
FROM ${PLUGINS_RELEASE_IMAGE} as release

View File

@ -24,8 +24,9 @@ RUN update-ca-certificates
ENV PATH "/usr/local/go/bin:$PATH"
ENV CGO_ENABLED=0
WORKDIR /go/src/
COPY image/ .
COPY image/go.mod image/go.sum ./
RUN go mod download
COPY image/ ./
RUN go build -v -o /usr/local/bin/config-function ./
FROM ${PLUGINS_RELEASE_IMAGE} as release

View File

@ -12,10 +12,9 @@ RUN update-ca-certificates
ENV PATH "/usr/local/go/bin:$PATH"
ENV CGO_ENABLED=0
WORKDIR /go/src/
COPY image/go.mod .
COPY image/go.sum .
COPY image/go.mod image/go.sum ./
RUN go mod download
COPY image/main.go .
COPY image/ ./
RUN go build -v -o /usr/local/bin/config-function ./
FROM ${PLUGINS_RELEASE_IMAGE} as release