https://github.com/stakater/dockerfile-awscli
Dockerfile for AWS CLI
https://github.com/stakater/dockerfile-awscli
aws-cli docker-image dockerfile
Last synced: 6 months ago
JSON representation
Dockerfile for AWS CLI
- Host: GitHub
- URL: https://github.com/stakater/dockerfile-awscli
- Owner: stakater
- Created: 2017-01-09T10:09:48.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T11:47:01.000Z (about 2 years ago)
- Last Synced: 2024-04-15T04:16:18.052Z (almost 2 years ago)
- Topics: aws-cli, docker-image, dockerfile
- Size: 1.95 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dockerfile for AWS CLI
This is an alpine based docker image with AWS CLI installed.
## How to Use:
If you are running it on an EC2 instance, you can do it without configuring the AWS CLI, provided that the role of the instance has permision to execute the AWS CLI command
```
docker run -it stakater/aws-cli aws ec2 describe-instances --region us-west-2
```
If you are running it from somewhere else, you'll need to configure AWS CLI, for that, you can configure it on the host machine and map the `~/.aws` directory inside the container
```
docker run -it -v /home/stakater/.aws:/root/.aws stakater/aws-cli aws ec2 describe-instances --region us-west-2
```
In case you want to download something from AWS and make it available on the host machine as well, you can map the working directory of the container on the host machine.
```
docker run -it -v /home/stakater/Downloads/awscli_downloads:/aws stakater/aws-cli aws s3 cp http://myS3Bucket/myFile .
```