Sign inSign up

unfor19/iamlive-docker

By unfor19

•Updated almost 3 years ago

The source code for building iamlive Docker image

Image
0

6.5K

unfor19/iamlive-docker repository overview

⁠iamlive-docker

Push latest version to DockerHub Dockerhub pulls

Run iamlive⁠ as a Docker container.

To read more about how iamlive works, see Determining AWS IAM Policies According To Terraform And AWS CLI ⁠

⁠Requirements

  1. AWS Account Credentials Configured⁠
  2. AWS CLI⁠
  3. Docker⁠

⁠Getting Started

⁠Run iamlive
  1. Git clone this repo, or curl⁠ relevant files
    curl -L --remote-name-all https://raw.githubusercontent.com/unfor19/iamlive-docker/master/{Dockerfile,.dockerignore,Makefile,entrypoint.sh,generate_ca.sh} && \
    chmod +x entrypoint.sh generate_ca.sh
    
  2. Terminal #1: Build the Docker image
    make build
    
  3. Terminal #2: Run the Docker image for the first time
    make run
    # Runs in the background ...
    # Average Memory Usage: 88MB
    
  4. Terminal #1: Copy CA certificate from the container to host; To keep ca.pem valid for future runs, do not remove the iamlive-docker container.
    make copy
    
⁠Proxy IAM Requests Through iamlive
  1. Terminal #1: Set AWS credentials

    export AWS_PROFILE=MY_AWS_PROFILE
    

    OR

    export AWS_ACCESS_KEY_ID=MY_AWS_ACCESS_KEY_ID
    
    export AWS_SECRET_ACCESS_KEY=MY_AWS_SECRET_ACCESS_KEY
    
  2. Terminal #1: Set required environment variables HTTP_PROXY, HTTPS_PROXY⁠ and AWS_CA_BUNDLE⁠

    export \
        HTTP_PROXY=http://127.0.0.1:80 \
        HTTPS_PROXY=http://127.0.0.1:443
    

    AND

    export AWS_CA_BUNDLE="${HOME}/.iamlive/ca.pem"
    
  3. Terminal #1: Test it by making calls to AWS, using the CLI is the easiest way

    aws s3 ls
    

    Terminal #2: iamlive output after aws s3 ls

     {
         "Version": "2012-10-17",
         "Statement": [
             {
                 "Effect": "Allow",
                 "Action": [
                     "s3:ListAllMyBuckets"
                 ],
                 "Resource": "*"
             }
         ]
     }   
    
  4. Terminal #1: Stop the iamlive container

    make stop
    
  5. Terminal #2: Start iamlive container again (no need to invoke make copy)

    make start
    
  6. Terminal #1: Do your thing again ;)

⁠Authors

Created and maintained by Meir Gabay⁠

⁠License

This project is licensed under the DBAD⁠ License - see the LICENSE⁠ file for details

Tag summary

Content type

Image

Digest

sha256:c754bceed…

Size

18 MB

Last updated

almost 3 years ago

docker pull unfor19/iamlive-docker