-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from mikaint/env_vars
Add environmental variables support
- Loading branch information
Showing
5 changed files
with
42 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
AWS_ACCESS_KEY_ID= | ||
AWS_SECRET_ACCESS_KEY= | ||
AWS_DEFAULT_REGION= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,31 @@ | ||
[![Build Status](https://travis-ci.org/mikaint/aws-cli-docker.svg?branch=master)](https://travis-ci.org/mikaint/aws-cli-docker) | ||
|
||
# AWS CLI (dockerized) | ||
A docker image with AWS CLI installed. | ||
|
||
## Configuration | ||
The first step in order to use AWS CLI image is to set the required environmental variables to be used in the container. | ||
``` | ||
cp .env.dist .env | ||
``` | ||
Edit .env file with your values (can be obtained from AWS IAM) | ||
|
||
## How to use | ||
|
||
|
||
Default command is `--version` so if you run | ||
``` | ||
docker run mikaint/awscli | ||
``` | ||
you'll get something like | ||
``` | ||
aws-cli/1.16.216 Python/2.7.16 Linux/4.9.184-linuxkit botocore/1.12.206 | ||
``` | ||
The above command will run even without setting your configuration values as it will not make a request to AWS | ||
|
||
In order to run any other command that will make a request to AWS you'll need to specify your file that contains the configuration values | ||
``` | ||
docker run --env-file=.env mikaint/awscli ec2 describe-instances | ||
``` | ||
For a full list of available commands please check the official AWS CLI [documentation page](https://docs.aws.amazon.com/cli/index.html) | ||
|