Elastic Container Registry Configuration - RyanShahidi/Django-Nuxt-Docker-AWS-Cookiecutter GitHub Wiki
Setting up Elastic Container Registry (ECR)
The following steps need to be completed for the backend, frontend, and nginx configurations. We will walk through the steps for setting-up the backend, but the configuration is similar for the frontend and nginx. These instructions are incomplete.
- Click Create repository
- Give the repository a name. Ex: jarvis-backend
- Leave Tag immutability and Image scan settings Disabled
- Click Create repository
- Copy the URI that was created to the buildspec-backend.yml in the master file directory, replacing the placeholder value:
phases:
pre_build:
commands:
- REPOSITORY_URI=**************REPOSITORY URL REPLACE ME******************************
- Now this code will allow us to automatically push any updated code to this repository in the future, but we need some code to start-out with.
- Follow the instructions here to get AWS Tools for PowerShell on Windows set-up and here for instructions on set-up on Linux or Mac.
- You can also download the AWS Command Line Interface, which is what I prefer and will discuss. To use cli we need to create a user that can access everything.
- Go to IAM and click add user
- Make a username
- Select Programmatic access
- Now go to Permissions. I am using the following permissions:
- AmazonEC2ContainerRegistryFullAccess
- Copy the Access key and secret access key, this is the only time they will be given
- Using these codes we can run aws configure after installing the AWS CLI.
- Navigate to the Elastic Container Registry dashboard. Open your repository. Select View push commands. Copy and run the macOS/Linux commands
These instructions will be updated in the future to provide clearer documentation on the initial set-up.