File tree 2 files changed +11
-10
lines changed
2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 1
1
FROM amazon/aws-cli:latest
2
2
3
3
RUN yum install jq -y && curl -sL -o /usr/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \
4
- curl -sL -o /usr/local/ bin/aws-iam-authenticator $(curl -s https://api.github.com/repos/kubernetes-sigs/aws-iam-authenticator/releases/latest | jq -r ' .assets[] | select(.name | contains("linux_amd64") )' | jq -r '.browser_download_url' ) && \
5
- chmod +x /usr/local/ bin/aws-iam-authenticator && \
4
+ curl -sL -o /usr/bin/aws-iam-authenticator $(curl -s https://api.github.com/repos/kubernetes-sigs/aws-iam-authenticator/releases/latest | jq -r ' .assets[] | select(.name | contains("linux_amd64") )' | jq -r '.browser_download_url' ) && \
5
+ chmod +x /usr/bin/aws-iam-authenticator && \
6
6
chmod +x /usr/bin/kubectl
7
7
8
8
COPY entrypoint.sh /entrypoint.sh
Original file line number Diff line number Diff line change @@ -10,20 +10,21 @@ if [ -z ${KUBECTL_VERSION+x} ] ; then
10
10
echo " Using kubectl version: $( kubectl version --client --short) "
11
11
else
12
12
echo " Pulling kubectl for version $KUBECTL_VERSION "
13
- rm /usr/bin/kubectl
14
- curl -sL -o /usr/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/$KUBECTL_VERSION /bin/linux/amd64/kubectl && \
13
+ rm /usr/bin/kubectl
14
+ curl -sL -o /usr/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/" $KUBECTL_VERSION " /bin/linux/amd64/kubectl && \
15
15
chmod +x /usr/bin/kubectl
16
16
echo " Using kubectl version: $( kubectl version --client --short) "
17
17
fi
18
18
19
19
if [ -z ${IAM_VERSION+x} ] ; then
20
- echo " Using aws-iam-authenticator version: v $( aws-iam-authenticator version) "
20
+ echo " Using aws-iam-authenticator version: $( aws-iam-authenticator version) "
21
21
else
22
- echo " Pulling aws-iam-authenticator for version v $IAM_VERSION "
23
- rm /usr/local/ bin/aws-iam-authenticator
24
- curl -sL -o /usr/local/ bin/aws-iam-authenticator https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v$IAM_VERSION /aws-iam-authenticator_$IAM_VERSION_linux_amd64 && \
25
- chmod +x /usr/local /bin/aws-iam-authenticator
26
- echo " Using aws-iam-authenticator version: v $( aws-iam-authenticator version) "
22
+ echo " Pulling aws-iam-authenticator for version $IAM_VERSION "
23
+ rm /usr/bin/aws-iam-authenticator
24
+ curl -sL -o /usr/bin/aws-iam-authenticator https://github.com/kubernetes-sigs/aws-iam-authenticator/releases/download/v" $IAM_VERSION " /aws-iam-authenticator_" $IAM_VERSION " _linux_amd64 && \
25
+ chmod +x /usr/bin/aws-iam-authenticator
26
+ echo " Using aws-iam-authenticator version: $( aws-iam-authenticator version) "
27
27
fi
28
28
29
29
sh -c " kubectl $* "
30
+ # sh -c "which aws-iam-authenticator"
You can’t perform that action at this time.
0 commit comments