Skip to content

Commit ac5551b

Browse files
author
Sandip Das
committed
buildspec fix
1 parent 6329c59 commit ac5551b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

buildspec.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ phases:
88
- echo Logging in to Amazon ECR...
99
- 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
1010
- REPOSITORY_URI=$AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME
11-
- docker pull $REPOSITORY_URI:$IMAGE_TAG
1211
build:
1312
commands:
1413
- echo Build started on `date`
1514
- echo Building the Docker image...
16-
- docker build --cache-from $REPOSITORY_URI:$IMAGE_TAG -t $IMAGE_REPO_NAME:$IMAGE_TAG .
15+
- docker build -t $IMAGE_REPO_NAME:$IMAGE_TAG .
1716
- docker tag $IMAGE_REPO_NAME:$IMAGE_TAG $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$IMAGE_TAG
1817
post_build:
1918
commands:
@@ -23,5 +22,4 @@ phases:
2322
- echo Writing image definitions file...
2423
- printf '[{"name":"%s","imageUri":"%s"}]' $CONTAINER_NAME $REPOSITORY_URI:$IMAGE_TAG > imagedefinitions.json
2524
artifacts:
26-
files: imagedefinitions.json
27-
25+
files: imagedefinitions.json

0 commit comments

Comments
 (0)