Sign inSign up

npiper/docker-aws

By npiper

•Updated over 8 years ago

Docker container for setting up AWS settings, CLI , Ruby for interaction.

Image
0

1.1K

npiper/docker-aws repository overview

⁠Docker container for AWS Scripting

This docker container saves you setting up a Ruby / local environment where you have access to AWS assets, and can be used to generate the one time token and credentials.

⁠Docker Image name default

npiper/docker-aws

To see if it is built use 'docker images' and look for this label.

⁠Pre-Requisites

  • Access to am Amazon account and sign in credentials
  • Docker

The Docker image is base on the public ruby:2.4.2 image.

The image includes the following SDK's for interacting with AWS:

  • AWS cli
  • AWS Ruby SDK v2
  • AWS ECS CLI (Container service)

The goal is to make this a portable Docker container that Developers / Build engineers can use to interact with AWS just by editing this file without the need of setting up their own VM , installing all required software etc;.

⁠To Build

Execute the ./build.sh script or

docker build -t npiper/docker-aws

⁠To Run

Execute the ./run.sh script.. or

docker run -it npiper/docker-aws bash

Have your AWS Access key, Secret access key, desired region (default eu-west-1, Ireland) ready and run as your first command in the docker image:

aws configure

⁠Executing scripts

Once you are in the running instance follow the following commands to start to execute AWS integration.

There is a separate 'aws' user & sub-environment created for executing these commands.

# Switch to aws user
su aws
# Configure your profile to use region ap-southeast-2 by default
aws configure --profile $AD_USER set region ap-southeast-2
# List your AWS instances in that region
aws ec2 describe-instances

⁠Sample Projects

⁠Create Amazon EC2 Container service Identities and sample

https://github.com/npiper/ecs-poc⁠

⁠References

AWS Using Credentials⁠

Amazon Ruby v2 SDK API Docs⁠

Using Amazon ECS CLI⁠

github AWS-CLI Docker image project - fstab ⁠

⁠In a Federated environment

http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html⁠

https://aws.amazon.com/blogs/security/how-to-implement-federated-api-and-cli-access-using-saml-2-0-and-ad-fs/⁠

Tag summary

Content type

Image

Digest

Size

462.6 MB

Last updated

over 8 years ago

docker pull npiper/docker-aws