Log in to the AWS Management Console and search for the Elastic Container Registry (ECR) service.
On the main ECR screen, click the Create repository button to start creating a new repository.
Step 2: Configure Repository information
In the Repository name section, enter a memorable name of your choice (For example: your-ecommerce-backend).
In the Image tag settings section, select Mutable.
Keep the remaining default settings, scroll down to the bottom of the page, and click the Create repository button.
Step 3: Get the list of execution commands
After successful creation, your repository will appear in the list. Click on the name of the repository you just created.
In the top right corner, click the View push commands button.
Step 4: Execute push commands from the Terminal
At this point, AWS will display a Popup containing 4 execution steps corresponding to 4 commands. These commands have been automatically pre-filled by AWS with your AWS Account ID, Region, and the Repository Name you just set.
Open the Terminal (or Command Prompt) on your personal computer and navigate to the directory containing your Docker setup file.
One by one, copy each command from the console screen and paste it into the Terminal to run. This process includes: Logging in, Building the Image, Tagging, and Pushing to the Cloud.
Step 5: Verify the results on ECR
After the final command finishes running 100% in the Terminal, close the Popup and refresh the web page of your ECR repository.
You will see a new record appear with the Image tag as latest.
Pay attention and copy the URI column in the Repositories tab (It will be in the format [Your-Account-ID].dkr.ecr.[Your-Region].amazonaws.com/[Your-Repo-Name]:latest). We will use this URI snippet for the next server configuration step.