Last active
January 3, 2019 13:05
-
-
Save sigursoft/f06f3cb32b65cc8bb54ff83331af9b79 to your computer and use it in GitHub Desktop.
[Debian] kops + kubectl + aws cli
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM debian:stable | |
| LABEL maintainer="Anton Kozik" | |
| ENV LAST_UPDATE=2019-01-03 | |
| ARG KOPS_VERSION=1.11.0 | |
| ARG KUBECTL_VERSION=1.11.6 | |
| ARG AWSCLI_VERSION=1.16.82 | |
| RUN apt-get update -qq | |
| RUN apt-get install -y \ | |
| jq \ | |
| nano \ | |
| groff \ | |
| bash-completion | |
| RUN apt-get -y install \ | |
| python-pip && \ | |
| pip install awscli==${AWSCLI_VERSION} && \ | |
| apt-get clean && \ | |
| apt-get autoclean && \ | |
| apt-get autoremove && \ | |
| rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
| ADD https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl /usr/local/bin/kubectl | |
| RUN chmod +x /usr/local/bin/kubectl | |
| ADD https://github.com/kubernetes/kops/releases/download/${KOPS_VERSION}/kops-linux-amd64 /usr/local/bin/kops | |
| RUN chmod +x /usr/local/bin/kops | |
| RUN useradd -ms /bin/bash kops | |
| WORKDIR /home/kops | |
| USER kops | |
| RUN mkdir /home/kops/.kube && \ | |
| touch /home/kops/.kube/config | |
| RUN echo ". /etc/bash_completion" >> ~/.bashrc && \ | |
| echo "source <(kubectl completion bash)" >> ~/.bashrc | |
| ENTRYPOINT ["/bin/bash"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment