Skip to content

Pushing to AWS

Henry Mehta edited this page Jul 11, 2022 · 6 revisions

Pushing container to private Docker repository on Amazon ECR

Create a new AWS Elastic Container Registry. Navigate to the ECR and select 'view push commands'. Copy each of these in turn. Make sure to execute docker build from inside the app directory of the git repository.

Please note, if you have multiple AWS logins you'll need to specify the profile (eg --profile web-cdi) to use within the aws ecr --profile web-cdi get-login-password --region us-west-2 | docker login --username AWS --password-stdin 268692754097.dkr.ecr.us-west-2.amazonaws.com command.

Using container with Elastic Beanstalk

Go to the ElasticBeanstalk environment instance and select 'Upload and Deploy'. Select the Dockerrun.aws.json in the project root (ensure you select the relevant Dockerrun.aws.xxx.json for the environment you are using).