# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 version: 0.2 phases: pre_build: commands: - echo Logging in to Amazon ECR... - aws ecr get-login-password --region $AWS_DEFAULT_REGION | docker login --username AWS --password-stdin $ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com build: commands: - echo Build started on `date` - echo Building the folding Docker image - docker build --build-arg AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION --build-arg AWS_CONTAINER_CREDENTIALS_RELATIVE_URI=$AWS_CONTAINER_CREDENTIALS_RELATIVE_URI -t $FOLDING_IMAGE_REPO_NAME:$FOLDING_IMAGE_TAG --build-arg AF_VERSION=$AF_VERSION docker/folding - docker tag $FOLDING_IMAGE_REPO_NAME:$FOLDING_IMAGE_TAG $ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$FOLDING_IMAGE_REPO_NAME:$FOLDING_IMAGE_TAG post_build: commands: - echo Build completed on `date` - echo Pushing the folding Docker image - docker push $ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$FOLDING_IMAGE_REPO_NAME:$FOLDING_IMAGE_TAG