の実行し、ソースを取得 古いコンテナを新しいコンテ に差し替える Transition Transition buildspec.yml imagedefinitions .json version: 0.2 phases: pre_build: commands: - $(aws ecr get-login --region $AWS_DEFAULT_REGION --no-include-email) 環境変数定義ができる build: commands: - docker build -t $AWS_ACCOUNT_ID.dkr.ecr.ap-northeast-1.amazonaws.com/rails:latest . post_build: commands: - docker push $AWS_ACCOUNT_ID.dkr.ecr.ap-northeast-1.amazonaws.com/rails:latest - echo Writing image definitions file... - printf '[{"name":"rails","imageUri":"%s"}]' - $AWS_ACCOUNT_ID.dkr.ecr.ap-northeast-1.amazonaws.com/rails:latest > imagedefinitions.json artifacts: files: imagedefinitions.json [ {"name":"rails","imageUri":"AWS_ACCOUNT_ID.dkr.ecr.ap-northeast- 1.amazonaws.com/rails:latest"} ]