Run a container with awcli and s3cmd installed. For example, you can run this on CoreOS where awcli and s3cmd are not available. One use case is to fire up the container to get data from s3 bucket to /apps directory and the data can be shared out on the docker host for other containers to use.
A credentials file will be set at /root/.aws/credentials if you pass docker -e "AWS_ACCESS_KEY=your_key" -e "AWS_SECRET_KEY=your_secret" And set default region -e "AWS_REGION=us-west-2"
Volumes are set at /apps and /data
/usr/bin/docker run --rm -v /var/apps:/apps guruvan/awscli:latest aws s3 cp --recursive s3:///apps/nginx/ /apps/nginx
- Run an interactive shell so you can use clitools directly:
/usr/bin/docker run -it --rm \
-e "AWS_ACCESS_KEY=your_key" \
-e "AWS_SECRET_KEY=your_secret"
-e "AWS_REGION=us-west-2" \
-v /opt/data:/data \
guruvan/awscli /bin/bash
/usr/bin/docker run
--name data_container
-e "AWS_ACCESS_KEY=your_key"
-e "AWS_SECRET_KEY=your_secret"
-e "AWS_REGION=us-west-2"
-v /opt/data:/data
guruvan/awscli aws s3 cp --recursive s3:///apps/nginx/ /apps/nginx
Content type
Image
Digest
sha256:a5acf3455…
Size
262.1 MB
Last updated
over 10 years ago
docker pull guruvan/awscli