Skip to content

Instantly share code, notes, and snippets.

@habedi
Last active August 31, 2024 17:43
Show Gist options
  • Save habedi/d663dd62cfe2c2c9fc157e775e121e67 to your computer and use it in GitHub Desktop.
Save habedi/d663dd62cfe2c2c9fc157e775e121e67 to your computer and use it in GitHub Desktop.

Revisions

  1. habedi revised this gist Aug 31, 2024. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions make_aws_access_keys.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,9 @@
    #!/bin/bash

    # Description: This script will create the AWS access keys using the Azure account credentials.
    # First, run the docker container (code below) and then enter the Azure account credentials.
    # The AWS access keys will be created and stored in the ~/.aws/credentials file in the host machine.

    docker run -it --rm \
    --name aws-azure-login \
    --workdir /root \
  2. habedi revised this gist Aug 30, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion make_aws_access_keys.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # Description: This script will create the AWS access keys using the Azure account credentials.
    # First, run the docker container (code below) and then enter the Azure account credentials.
    # The AWS access keys will be created and stored in the ~/.aws/credentials file in the host machine.
    docker run -it \
    docker run -it --rm \
    --name aws-azure-login \
    --workdir /root \
    -v ${HOME}/.aws:/root/.aws \
  3. habedi revised this gist Aug 29, 2024. 2 changed files with 8 additions and 15 deletions.
    15 changes: 0 additions & 15 deletions docker-compose.yml
    Original file line number Diff line number Diff line change
    @@ -1,15 +0,0 @@
    version: '3.8'

    services:
    aws-azure-login:
    image: dtjohnson/aws-azure-login # This an old Docker image that still works :-)
    container_name: aws-azure-login-container
    working_dir: /root # Set the working directory to /root
    volumes:
    - ${HOME}/.aws:/root/.aws # Mount the local ~/.aws directory to /root/.aws inside the container
    stdin_open: true # Keep STDIN open even if not attached
    tty: true # Make a pseudo-TTY

    ## How to run the container
    # docker attach aws-azure-login-container
    ## Then enter the credentials
    8 changes: 8 additions & 0 deletions make_aws_access_keys.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    # Description: This script will create the AWS access keys using the Azure account credentials.
    # First, run the docker container (code below) and then enter the Azure account credentials.
    # The AWS access keys will be created and stored in the ~/.aws/credentials file in the host machine.
    docker run -it \
    --name aws-azure-login \
    --workdir /root \
    -v ${HOME}/.aws:/root/.aws \
    dtjohnson/aws-azure-login
  4. habedi revised this gist Aug 29, 2024. No changes.
  5. habedi revised this gist Aug 29, 2024. 1 changed file with 0 additions and 3 deletions.
    3 changes: 0 additions & 3 deletions docker-compose.yml
    Original file line number Diff line number Diff line change
    @@ -9,9 +9,6 @@ services:
    - ${HOME}/.aws:/root/.aws # Mount the local ~/.aws directory to /root/.aws inside the container
    stdin_open: true # Keep STDIN open even if not attached
    tty: true # Make a pseudo-TTY
    build:
    context: .
    command: [ "sh", "-c", "while :; do sleep 2073600; done" ] # Keep the container running (not needed)

    ## How to run the container
    # docker attach aws-azure-login-container
  6. habedi created this gist Aug 29, 2024.
    18 changes: 18 additions & 0 deletions docker-compose.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    version: '3.8'

    services:
    aws-azure-login:
    image: dtjohnson/aws-azure-login # This an old Docker image that still works :-)
    container_name: aws-azure-login-container
    working_dir: /root # Set the working directory to /root
    volumes:
    - ${HOME}/.aws:/root/.aws # Mount the local ~/.aws directory to /root/.aws inside the container
    stdin_open: true # Keep STDIN open even if not attached
    tty: true # Make a pseudo-TTY
    build:
    context: .
    command: [ "sh", "-c", "while :; do sleep 2073600; done" ] # Keep the container running (not needed)

    ## How to run the container
    # docker attach aws-azure-login-container
    ## Then enter the credentials