File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ version : 0.2
2+
3+ phases :
4+ pre_build :
5+ commands :
6+ - echo Logging into Amazon ECR...
7+ - aws --version
8+ - $(aws ecr get-login-password --region $AWS_DEFAULT_REGION | docker login --username AWS --password-stdin $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com)
9+ build :
10+ commands :
11+ - echo Building Docker image...
12+ - docker build -t myapp .
13+ - docker tag myapp:latest $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/myapp:latest
14+ post_build :
15+ commands :
16+ - echo Pushing Docker image...
17+ - docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/myapp:latest
18+ - echo Creating imagedefinitions.json...
19+ - printf '[{"name":"myapp-container","imageUri":"%s"}]' $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/myapp:latest > imagedefinitions.json
20+
21+ artifacts :
22+ files :
23+ - imagedefinitions.json
You can’t perform that action at this time.
0 commit comments