Code Monkey home page Code Monkey logo

aws-ebcli's Introduction

AWS CLI and AWS EB CLI tools

Location on Docker Hub coxauto/aws-ebcli

A container for running:

  • AWS CLI
  • AWS EB CLI
  • CLI53

Running - in a CLI

To run the CLI tools, use the CLI command just like you normally would. The combination of -w and -v mounts your PWD into the container as the current working directory for the EB CLI. If you're on Windows you'll want to use %cd% instead of $PWD.

docker run -i -w /work -v $PWD:/work coxauto/aws-ebcli eb --version
docker run -i coxauto/aws-ebcli aws --version
docker run -i -w /work -v $PWD:/work coxauto/aws-ebcli eb create test-app-${BUILD_NUMBER}
docker run -i coxauto/aws-ebcli aws ec2 describe-instances --region=us-east-1

To provide credentials, you have 2 options:

  1. Use -e to export all your AWS creds env vars
  2. Mount your ~/.aws directory to the docker container

Example with -e

docker run -i -w /work -v $PWD:/work -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY -e AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN coxauto/aws-ebcli eb status
docker run -i -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY -e AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN coxauto/aws-ebcli aws ec2 describe-instances --region=us-east-1

Example with mounting ~/.aws

docker run -i -w /work -v $PWD:/work -v ~/.aws:/home/root/.aws coxauto/aws-ebcli eb status

Running - via a Jenkinsfile

Use in a Jenkinsfile with docker workflow plugin:

docker.image('coxauto/aws-ebcli').inside('-u root:root') {
    sh 'eb create test-app-${BUILD_NUMBER}'
}

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.