Skip to content

Commit 6a2986e

Browse files
author
Sean Sundberg
committed
Upgrades oc and kubectl versions to latest
- oc cli: v4.5.11 - kubectl cli: v1.19.2
1 parent c51539e commit 6a2986e

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

Dockerfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
FROM docker.io/hashicorp/terraform:0.12.26
22

33
ENV TERRAFORM_IBMCLOUD_VERSION 1.9.0
4-
ENV KUBECTL_VERSION 1.15.5
4+
ENV KUBECTL_VERSION 1.19.2
5+
ENV OPENSHIFT_CLI_VERSION 4.5.11
56

67
RUN apk add --update-cache \
78
curl \
@@ -62,13 +63,16 @@ WORKDIR ${HOME}
6263
COPY --chown=devops:root src/image-message ./image-message
6364
RUN cat ./image-message >> ./.bashrc-ni
6465

65-
RUN curl -L https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz --output oc-client.tar.gz && \
66-
tar xzf oc-client.tar.gz && \
66+
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/clients/ocp/${OPENSHIFT_CLI_VERSION}/openshift-client-linux.tar.gz --output oc-client.tar.gz && \
67+
mkdir tmp && \
68+
cd tmp && \
69+
tar xzf ../oc-client.tar.gz && \
6770
sudo mkdir -p /usr/local/fix && \
6871
sudo chmod a+rwx /usr/local/fix && \
69-
sudo cp openshift-origin-client-tools*/oc /usr/local/fix && \
72+
sudo cp ./oc /usr/local/fix && \
7073
sudo chmod +x /usr/local/fix/oc && \
71-
rm -rf openshift-origin-client-tools* && \
74+
cd .. && \
75+
rm -rf tmp && \
7276
rm oc-client.tar.gz && \
7377
echo '/lib/ld-musl-x86_64.so.1 --library-path /lib /usr/local/fix/oc $@' > ./oc && \
7478
sudo mv ./oc /usr/local/bin && \

0 commit comments

Comments
 (0)