forked from iam-veeramalla/aws-devops-zero-to-hero
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ade8fd8
commit dd61782
Showing
1 changed file
with
8 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Login to ECR (replace <region> and <account-id> with your actual values) | ||
$ aws ecr get-login-password --region <region> | docker login --username AWS --password-stdin <account-id>.dkr.ecr.<region>.amazonaws.com | ||
|
||
# Build the Docker image (replace <repo-name> with your ECR repository name) | ||
$ docker build -t <account-id>.dkr.ecr.<region>.amazonaws.com/<repo-name>:latest . | ||
|
||
# Push the Docker image to ECR (replace <repo-name> with your ECR repository name) | ||
$ docker push <account-id>.dkr.ecr.<region>.amazonaws.com/<repo-name>:latest |