magnum/dockerfiles/cluster-autoscaler/Dockerfile
Bharat Kunwar 39ccad9cc4 Build new autoscaler containers
Versions: 1.16.5, 1.17.2 and 1.18.1

Story: 2007465
Task: 39152

Change-Id: Ie70e5ba38799c3da17ec9a34f6990f8c2d853732
2020-04-14 09:05:00 +00:00

16 lines
522 B
Docker

FROM golang:1.13.10 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"]