Created
May 23, 2019 05:55
-
-
Save mengjiann/ed7de455598640800e01fbd3c99c7250 to your computer and use it in GitHub Desktop.
Dockerfile for awscli with K8S deployment
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 python:2.7 | |
ENV AWS_DEFAULT_REGION='[your region]' | |
ENV AWS_ACCESS_KEY_ID='[your access key id]' | |
ENV AWS_SECRET_ACCESS_KEY='[your secret]' | |
RUN pip install awscli | |
CMD /bin/bash |
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
# Generate docker image | |
docker build -f ./Dockerfile -t my/awscli:latest . | |
# Run awscli in kubernetes. | |
kubectl run -i -t awscli --image=my/awscli --image-pull-policy=Never --rm=true -- bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment