* Add v1.21/v1.22 * Update v1.18/v1.19 to newest point releases * Drop v1.16/v1.17 * Update the go version in the build Dockerfile Change-Id: If31d8027fa3541f6124777392539200dd68ae7af
16 lines
521 B
Docker
16 lines
521 B
Docker
FROM golang:1.16.7 as builder
|
|
|
|
ARG AUTOSCALER_VERSION
|
|
|
|
ENV GOPATH=/go
|
|
|
|
WORKDIR $GOPATH/src/k8s.io/
|
|
RUN git clone -b ${AUTOSCALER_VERSION} --single-branch http://github.com/kubernetes/autoscaler.git autoscaler
|
|
WORKDIR autoscaler/cluster-autoscaler
|
|
RUN CGO_ENABLED=0 GO111MODULE=off GOOS=linux go build -o cluster-autoscaler --ldflags=-s --tags magnum
|
|
|
|
FROM gcr.io/distroless/static:latest
|
|
|
|
COPY --from=builder /go/src/k8s.io/autoscaler/cluster-autoscaler/cluster-autoscaler /cluster-autoscaler
|
|
CMD ["/cluster-autoscaler"]
|