version: 0.2 phases: install: commands: - echo Installing AWS CLI - apt-get update - apt-get install -y awscli pre_build: commands: - echo Logging in to Amazon ECR... - aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 891377396188.dkr.ecr.us-east-1.amazonaws.com - echo Downloading .env file from S3.. build: commands: - echo Build started on `date` - echo Building the Docker image... post_build: commands: - echo Build completed on `date` - echo Pushing the Docker image... artifacts: files: '**/*'