GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - robpco/docker-awscli: Minimal Alpine-based AWS CLI Image for Docker-based CI Runners & GitLab CI

BranchesTags
Open more actions menu

Latest commit

 

History

31 Commits
31 Commits

Folders and files

NameName
Last commit message
Last commit date
.cicd
.cicd
 
 
.github
.github
 
 
.gitlab-ci.yml
.gitlab-ci.yml
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

AWSCLI

Minimal AWS CLI Image for CI Runners and Local Alias Use

Supported tags and Dockerfile links

  • latest (Dockerfile)

GitHub Repo: https://github.com/robpco/docker-awscli

Docker Hub Image: https://hub.docker.com/r/robpco/awscli/

CI SERVER USAGE

Image created to enable CI runners to execute AWS CLI commands

  • Dramatically faster than downloading base image and installing AWS CLI for each execution
  • Downloads fast due to small size (33 MB compressed)
  • Executes fast as AWS CLI and dependancies are preinstalled
  • Includes bash, curl, git and zip commands for use in CI scripts

Example .gitlab-ci.yml (GitLab CI) using image to copy directory to S3

  • Set Entrypoint to override default of aws
  • Pass AWS Credentials via environment variables set as CI Secrets
image:
  name: robpco/awscli
  entrypoint:
    - '/usr/bin/env'
    - 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'

deploy:
  script:
  - aws s3 sync --no-progress --region "$BUCKET_REGION" "./settings" "$BUCKET_BASE/settings"

ALIAS USAGE

For CLI use create an alias .bashrc that passes credentials using one of the methods below

# Example alias that shares local host "~/.aws" directory
alias aws='docker run --rm -t -v ~/.aws:/root/.aws:ro $(tty &>/dev/null && echo "-i") robpco/awscli'

Passing Credentials

# Share .aws credential and configuration directories:
docker run --rm -v <config_path>:/root/.aws:ro \
                -v <option_yml>:/aws:ro \
                      robpco/awscli <argument>

# Share Credentials via Environment Variables:
docker run --rm -it -e AWS_ACCESS_KEY_ID \
                    -e AWS_SECRET_ACCESS_KEY \
                    -e AWS_DEFAULT_REGION \
                      robpco/awscli <argument>

# Explicitly Define Credentials:
docker run --rm -e AWS_ACCESS_KEY_ID=<key> \
                -e AWS_SECRET_ACCESS_KEY=<secret> \
                -e AWS_DEFAULT_REGION=<region> \
                -v <option_yml>:/aws:ro \
                      robpco/awscli <argument>

About

Minimal Alpine-based AWS CLI Image for Docker-based CI Runners & GitLab CI

hub.docker.com/r/robpco/awscli

Topics

awsclici-cddockerdocker-imagedockerfilegitlab-awsgitlab-cigitlab-dockergitlab-runner

Resources

Readme
MIT license
Activity
Custom properties

Stars

4 stars

Watchers

1 watching

Forks

5 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.