简体   繁体   中英

CodePipeline: How to integrate ECR with Elastic Beanstalk?

I'm trying to combine ECR and Elastic Beanstalk with the following CodePipeline setup:

  1. Source : CodeCommit
  2. Build : buildspec.yml which Builds a docker image and pushes it to ECR repository
  3. 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:

  1. How do you trigger beanstalk from step 3 to use the latest ECR image?
    1. Which artifacts should be included (if any) from step 1/2?
    2. Is the artifact is just the same Dockerrun.aws.json which point to the ECR image file every time?
  2. 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?
    1. if so - Where can I see the build process of the image?
    2. Is there a way to select a different Dockerfile from the source code?

为寻找答案:只包括Dockerrun.aws.json文件中的文物buildspec.yml和它的指向image领域的ECR图像。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM