I'm trying to combine ECR and Elastic Beanstalk with the following CodePipeline setup:
- Source : CodeCommit
- Build :
buildspec.ymlwhich Builds a docker image and pushes it to ECR repository - Deploy: Elastic Beanstalk
Note that Step 2 doesn't contain any artifacts, it merely builds the new image from the source code by using docker build -t <my-image> . and pushes it to ECR with the latest tag.
My Questions are:
- How do you trigger beanstalk from step 3 to use the latest ECR image?
- Which artifacts should be included (if any) from step 1/2?
- Is the artifact is just the same
Dockerrun.aws.jsonwhich point to the ECR image file every time?
- Alternative way: Should I just deploy the entire source code to beanstalk and let it use the Dockerfile in the package instead so it will build it?
- if so - Where can I see the build process of the image?
- Is there a way to select a different Dockerfile from the source code?