Last active
August 21, 2018 13:35
-
-
Save comtom/6af8ed49282b425d813376c1e6d6376e to your computer and use it in GitHub Desktop.
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 alpine:3.7 | |
| ENV KUBE_VERSION="v1.11.2" | |
| ENV ANSIBLE_VERSION="2.5.0" | |
| ENV TERRAFORM_VERSION="0.11.8" | |
| # install kubectl | |
| RUN set -ex \ | |
| && apk add --update ca-certificates \ | |
| && apk add --update -t deps curl \ | |
| && curl -L https://storage.googleapis.com/kubernetes-release/release/${KUBE_VERSION}/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl \ | |
| && chmod +x /usr/local/bin/kubectl | |
| # install ansible | |
| RUN set -ex \ | |
| && apk add --no-cache py-pip build-base python-dev libffi-dev openssl-dev \ | |
| && pip install ansible | |
| # install terraform | |
| RUN set -ex \ | |
| && apk add --no-cache unzip \ | |
| && curl -L https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip -o /tmp/terraform_${TERRAFORM_VERSION}_linux_amd64.zip \ | |
| && unzip /tmp/terraform_${TERRAFORM_VERSION}_linux_amd64.zip -d /usr/local/bin | |
| # cleanup | |
| RUN apk del --purge deps \ | |
| && rm /var/cache/apk/* \ | |
| && rm -rf /tmp/* \ | |
| && rm -rf /var/cache/apk/* \ | |
| && rm -rf /var/tmp/* | |
| WORKDIR /root | |
| ENTRYPOINT ["kubectl"] | |
| CMD ["help"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment