Skip to content

Commit

Permalink
Update Go to 1.12.6 and update build flags in Dockerfile (#1092)
Browse files Browse the repository at this point in the history
Signed-off-by: Vince Prignano <[email protected]>
  • Loading branch information
vincepri authored and k8s-ci-robot committed Jul 1, 2019
1 parent 8d01532 commit 5653faa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

# Build the manager binary
FROM golang:1.12.5 as builder
FROM golang:1.12.6 as builder

ARG ARCH

Expand All @@ -22,9 +22,13 @@ WORKDIR ${GOPATH}/src/sigs.k8s.io/cluster-api
COPY pkg/ pkg/
COPY cmd/ cmd/
COPY vendor/ vendor/
COPY go.mod go.mod
COPY go.sum go.sum

# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} go build -a -ldflags '-extldflags "-static"' -o manager sigs.k8s.io/cluster-api/cmd/manager
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} GO111MODULE=on GOFLAGS="-mod=vendor" \
go build -a -ldflags '-extldflags "-static"' \
-o manager sigs.k8s.io/cluster-api/cmd/manager

# Copy the controller-manager into a thin image
FROM gcr.io/distroless/static:latest
Expand Down

0 comments on commit 5653faa

Please sign in to comment.