Fork/modification of garland/aws-cli-docker
59
NOTE: Forked and modified from sekka1/aws-cli-docker. That one is more likely to work.
Dockerfile linksdocker build --tag scoots/aws-cli-docker:x.x .
Docker container with the AWS CLI installed.
Using Alpine linux. The Docker image is 87MB
An automated build of this image is on Docker Hub: https://hub.docker.com/r/scoots/aws-cli-docker/
http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-set-up.html#cli-signup
http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-environment
http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-command-line
http://docs.aws.amazon.com/cli/latest/index.html
docker run \
--volume ~/.aws:/root/.aws
scoots/aws-cli-docker \
ec2 describe-instances --instance-ids i-90949d7a
output:
{
"Reservations": [
{
"OwnerId": "960288280607",
"ReservationId": "r-1bb15137",
"Groups": [],
"RequesterId": "226008221399",
"Instances": [
{
"Monitoring": {
"State": "enabled"
},
"PublicDnsName": null,
...
...
}
docker run \
--volume ~/.aws:/root/.aws
scoots/aws-cli-docker \
s3 ls
output:
2014-06-03 19:41:30 folder1
2014-06-06 23:02:29 folder2
docker run \
--volume ~/.aws:/root/.aws
--volume $PWD:/data \
scoots/aws-cli-docker \
s3 sync . s3://mybucket
output:
(dryrun) upload: test.txt to s3://mybucket/test.txt
(dryrun) upload: test2.txt to s3://mybucket/test2.txt
doc: http://docs.aws.amazon.com/cli/latest/reference/s3/index.html
We will map the private keys that resides on your local system to inside the container
docker run \
--volume ~/.aws:/root/.aws
scoots/aws-cli-docker \
ec2 get-password-data --instance-id <<YOUR_INSTANCE_ID>> --priv-launch-key /tmp/key.pem
Output:
{
"InstanceId": "i-90949d7a",
"Timestamp": "2014-12-11T01:18:27.000Z",
"PasswordData": "8pa%o?foo"
}
doc: http://docs.aws.amazon.com/cli/latest/reference/ec2/get-password-data.html
docker-compose run aws s3 ls
Content type
Image
Digest
Size
25.8 MB
Last updated
about 8 years ago
docker pull scoots/aws-cli-docker:1.15.82