Skip to content
This repository has been archived by the owner on Jul 8, 2020. It is now read-only.

Docker image for drone that will authenticate to Amazon ECS

Notifications You must be signed in to change notification settings

movio/drone-auth-ecr

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

drone-auth-ecr is a docker image that lives in your docker registry that can be pulled to auth against ECR from within drone, enabling drone to pull from ECR

Author: Scott Lackey

This image acts as a liazon between your drone instance and Amazon ECR. It has the AWS ECR client and the docker daemon installed so that it can pull an image from ECR. Since drone shares it's volumes the ECR image is available for all build steps.

To build

  • Ensure your drone CI node in AWS is configured with an IAM role with permissions to interact with ECR/ECS
  • Ensure the config/config file has the correct AWS region.
  • build the image with docker build, tag and push

example usage in Drone v.5 pipeline

pipeline:
  auth:
    image: drone-auth-ecr
    commands:
      - aws ecr get-login --region us-east-1 | bash 
      - docker pull 12345.dkr.ecr.us-west-2.amazonaws.com/my-image:latest
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

  build:
    image: 12345.dkr.ecr.us-west-2.amazonaws.com/my-image:latest
    commands:
     - npm intstall
     - npm test

About

Docker image for drone that will authenticate to Amazon ECS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 100.0%