Thursday, December 23, 2021

Create Container in AWS ECS using custom Docker repository without EC2 instance [serverless]

Description: Here I have explained, How to create a Container in AWS ECS using console using Custom Docker image from the Docker repository.

In the previous Blog, I have explained how to create a custom image and upload it to Docker Hub. In this blog, I will use that custom image to create a container in AWS ECS.

Open ECS service and click on Get Started 











Creating custom container definition and edit task definition [if you want more resources]




Once you click on configure it will popup for details that need to fill like public repository and image details. In this example, I have used harpalgohilon/opensource:httpd

harpalgohilon = Docker hub user id 
opensource = Public Repository name
httpd = tag name 
Port = 80 














Also, you can define configuration in the Advance configuration tab like CPU, RAM, Health check, etc ...
























Now creating service and cluster after filling all the details and save












At last click on create button 












After clicking on create it will take some time to create the container. After a few moments container will create.










To check the container click on view services and it redirects to the Service dashboard.












Now click on tasks, you will get the list of tasks and its status [Running or Stopped]












Click on tasks it will show you all the details like public, private IP Status, etc...












Now browse the Public IP over browser, it will show the custom page which I have created on the last log



No comments:

Post a Comment