awslabs / awslabs/aws-solutions-constructs
New Pattern: aws-codebuild-ecr
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 268
- Avg merge
- 5h 18m
- Merged PRs (30d)
- 5
Description
Build a new pattern that allows customers to build Docker containers and push it to Elastic Container Registry
### Use Case
SageMaker consumes models in a docker image format. Therefore, a lot of machine learning models need to be wrapped in a docker container and pushed to ECR so that SageMaker can take its URL as input when deploying the model in SageMaker.
Besides that, this Construct can be very useful for CI/CD workloads since it allows customers to build a docker container and push it to a container registry all within a codebuild project.
### Proposed Solution
The solution is a new Construct that takes a Dockerfile and a buildspec.yml from a codebuild source configuration (codeCommit, github, codePipeline, or S3). Then creates a codebuild project that has Docker installed. Then builds a container using the Dockerfile. After that it gets credentials from ECR and pushes the built image to ECR.
The reference for this Construct will serve the same purpose as [this guide](https://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html)
### Other
[Docker Sample for CodeBuild](https://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html)
* [x] :wave: I may be able to implement this feature request
---
This is a :rocket: Feature Request
Contributor guide
Research direction
Start with the AWS Docker sample for CodeBuild linked in the issue and the proposed source configuration, Dockerfile, and buildspec.yml flow. The work is done when the new construct creates a Docker-enabled CodeBuild project that builds an image and pushes it to ECR for the supported source types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, docker, typescript
- Domain
- build-system, cloud, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100