How to Create 2 different versions of nginx images with custom static content and push them to the ECR with proper tags.
Can anyone please help with code and along with instructions or step wise execution.
How to Create 2 different versions of nginx images with custom static content and push them to the ECR with proper tags.
Can anyone please help with code and along with instructions or step wise execution.
using AWS linux image that is linux AMI
Sorry, I meant where will you be pushing the image from?
Credentials for registry push can be acquired using aws cli, and also using powershell if on windows
Anyway, the general format of an AWS ECR registry is
<account_id>.dkr.ecr.<region>.amazonaws.com
where you replace <account_id>
with your 12 digit AWS account ID and <region>
with the region you created the registry in, e.g. ap-southeast-1
So, build your images, then tag them for the ECR registry
docker tag <local_image>:<version> \
<account_id>.dkr.ecr.<region>.amazonaws.com/<remote_image>:<version>
where <local_image>:<local_version>
is what you created with docker build
, e.g. custom-nginx:1.0
and <remote_image>:<version>
can be the same, or something else (usually the same).
Now you need to docker login. The username is always AWS
Using aws cli
aws ecr get-login-password \
--region <region> \
| docker login \
--username AWS \
--password-stdin <aws_account_id>.dkr.ecr.<region>.amazonaws.com
Then you can push the image
docker push <account_id>.dkr.ecr.<region>.amazonaws.com/<your_image>:<your version>
Thank you so much for the help and i am really grateful it’s done. one more thing i neede d like ,
It would be really grateful if you can please help me on this.
i need it on urgent basis , if you can help then really appreciated.
I wanted to to host a healthcare web application to be consumed by external users over the internet.
You are assigned to implement it as per the following -
I’m afraid we cannot design an entire infrastructure for you in a simple discussion forum.
If you google, there are plenty of examples of cloudformation to deploy EKS clusters, but to satisfy the criteria for security, high availability etc, really needs the input of a quality infrastructure architect.
If your boss is asking you to personally do all this, and (I’m humbly assuming you’re a junior engineer) that is very risky on his part and very unfair on you.
There’s also a lot of legal hurdles with anything to do with heathcare if there is any patient data in the system.