This solution will create a working Docker image ECR pipeline which pulls AmazonLinux base image from DockerHub, then pushes to ECR and scans new images on each push. The following resources will be created:
- ECR Repository with Docker image scanning enabled by default
- CodeBuild Project
- S3 Bucket for CodePipeline artifacts
- IAM Roles for related services
Create a Personal Access Token for your Github account for the AWS webhook.
This application is deployed using AWS CloudFormation.
- GitHubRepo
- GitHubBranch
- GitHubToken (do not commit this value)
- GitHubUser
- RepositoryName (ECR repository name to be created)
- Local bash terminal
- Cloud9 (Oregon)
- CloudFormation (N.Virginia)
Create ECR pipeline resources: (add parameters)
aws cloudformation deploy --stack-name amazonlinux-ecr-pipeline --template-file cfn/ecr-pipeline-stack.yml --capabilities CAPABILITY_NAMED_IAM
Delete S3 objects for CodeSuite before deleting CloudFormation stacks
Delete Stacks:
aws cloudformation delete-stack --stack-name amazonlinux-ecr-pipeline
This library is licensed under the MIT License.