Skip to content

Commit 7f4e8d7

Browse files
adding kubectl versions to support overrides to Dockerfile
1 parent 8fb3ed2 commit 7f4e8d7

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@ FROM alpine:3.6 AS builder
22

33
RUN apk update && apk add curl
44

5-
RUN curl -o kubectl1.14 -L https://storage.googleapis.com/kubernetes-release/release/v1.14.0/bin/linux/amd64/kubectl
5+
RUN curl -o kubectl1.14 -L https://storage.googleapis.com/kubernetes-release/release/v1.16.0/bin/linux/amd64/kubectl
66
RUN curl -o kubectl1.15 -L https://storage.googleapis.com/kubernetes-release/release/v1.15.0/bin/linux/amd64/kubectl
7+
RUN curl -o kubectl1.14 -L https://storage.googleapis.com/kubernetes-release/release/v1.14.0/bin/linux/amd64/kubectl
8+
RUN curl -o kubectl1.13 -L https://storage.googleapis.com/kubernetes-release/release/v1.13.0/bin/linux/amd64/kubectl
9+
RUN curl -o kubectl1.12 -L https://storage.googleapis.com/kubernetes-release/release/v1.12.0/bin/linux/amd64/kubectl
10+
RUN curl -o kubectl1.11 -L https://storage.googleapis.com/kubernetes-release/release/v1.11.0/bin/linux/amd64/kubectl
711
RUN curl -o kubectl1.10 -L https://storage.googleapis.com/kubernetes-release/release/v1.10.0/bin/linux/amd64/kubectl
812
RUN curl -o kubectl1.6 -L https://storage.googleapis.com/kubernetes-release/release/v1.6.0/bin/linux/amd64/kubectl
913

@@ -13,12 +17,16 @@ FROM alpine:3.6
1317
RUN apk add --update bash
1418

1519
#copy all versions of kubectl to switch between them later.
20+
COPY --from=builder kubectl1.16 /usr/local/bin/
1621
COPY --from=builder kubectl1.15 /usr/local/bin/
1722
COPY --from=builder kubectl1.14 /usr/local/bin/
23+
COPY --from=builder kubectl1.13 /usr/local/bin/
24+
COPY --from=builder kubectl1.12 /usr/local/bin/
25+
COPY --from=builder kubectl1.11 /usr/local/bin/
1826
COPY --from=builder kubectl1.10 /usr/local/bin/kubectl
1927
COPY --from=builder kubectl1.6 /usr/local/bin/
2028

21-
RUN chmod +x /usr/local/bin/kubectl /usr/local/bin/kubectl1.6 /usr/local/bin/kubectl1.14 /usr/local/bin/kubectl1.15
29+
RUN chmod +x /usr/local/bin/kubectl /usr/local/bin/kubectl1.6 /usr/local/bin/kubectl1.11 /usr/local/bin/kubectl1.12 /usr/local/bin/kubectl1.13 /usr/local/bin/kubectl1.14 /usr/local/bin/kubectl1.15 /usr/local/bin/kubectl1.16
2230

2331
WORKDIR /
2432

0 commit comments

Comments
 (0)