Git Product home page Git Product logo

docker-aws's Introduction

What is docker-aws

Circle CI

Docker image for running the Amazon Web Services Command Line Interface and s3cmd. It creates a Docker image containing all dependencies needed to run aws and s3cmd. That way, you can run these tools in a Docker container without setting the dependencies on the host system.

How to use

There are specific CLI tools within the full range of the AWS CLI tool chain. Each of these has been mapped to a branch and tag so if you only need a specific CLI tool and/or have image size concerns there is something here to meet your needs. If you want all the AWS tool goodies, i.e. AWS CLI, RDS CLI, and S3CMD, then select the master branch with the latest tag in Docker Hub. Below are the mappings and usages:

GitHub Branch Docker Tag Size (MB) Usage Example
master latest 240 docker run -it cgswong/aws:latest
aws aws 69 docker run -it cgswong/aws:aws
s3cmd s3cmd 44 docker run -it cgswong/aws:s3cmd
rds rds 179 docker run -it cgswong/aws:rds

The master/latest starts a bash shell so you can use whatever tool you need. For the other containers they will start with the --version flag which shows the version for the respective CLI tool. Simply specify whatever options you need for the respective tool (this will replace the default --version flag).

Build from Source

  1. Make sure Docker is installed.

  2. Clone docker-aws from GitHub

    git clone https://github.com/cgswong/docker-aws.git
  3. Build the docker image

    cd docker-aws
    docker build -t [your_name]/aws:latest .
  4. Run a docker container with that image

    docker run -it [your_name]/aws:latest

AWS Credentials

There are three primary methods for setting up your AWS credentials:

  1. Run the setup using the container, i.e. when you run the CLI tools for the first time, you need to configure the aws cli with your AWS credentials. For example:

    / # aws configure
    AWS Access Key ID [None]: [YOUR_AWS_ACCESS_KEY_ID_HERE]
    AWS Secret Access Key [None]: [YOUR_AWS_SECRET_ACCESS_KEY_ID_HERE]
    Default region name [None]: [YOUR_AWS_REGION_HERE]
    Default output format [None]: [YOUR_AWS_OUTPUT_FORMAT_HERE]
  2. The volume /root/.aws has been exposed within the image for external access. Therefore you can mount the AWS credential file to the container:

    docker run --volume ~/.aws:/root/.aws cgswong/aws:latest aws [some_command]
  3. By configuring your EC2 instances to make use of IAM Roles, the AWS CLI tools can then transparently make use of this role. Note however, that not all CLI tools can currently leverage this functionality, namely some of the RDS tools.

Getting started with the AWS CLI and s3tools

For documentation on the AWS CLI, see the AWS command line interface documentation and the aws-cli GitHub page. For S3 tools, see the S3 tools documentation.

docker-aws's People

Contributors

cgswong avatar

Watchers

Wei Teh avatar James Cloos avatar Kyle Jones avatar Mark Sparks avatar Adam Wood avatar Russell Wilson avatar Tim Williamson avatar Raju Reddy avatar Derek Tandy avatar Chris Coffman avatar  avatar  avatar Daniel Williams avatar Angshuman Goswami avatar Rambabu Bethina avatar Russell Caswell avatar Vishnu V Alavur Kannan avatar Niranjan viswanath avatar Bob Lehmann avatar Chris Gillham avatar Jonathan Webb avatar IDM Service Account avatar

Forkers

cdunnegan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.