Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple docker containers in one EC2 instance through AWS ECS

Is it possible to run multiple docker containers in one EC2 instance through AWS ECS (EC2 Container Service)?

like image 988
tugberk Avatar asked Nov 27 '15 23:11

tugberk


People also ask

Can one EC2 instance have multiple containers?

For tasks using the EC2 launch type, clusters can contain multiple different container instance types, but each container instance may only be registered to one cluster at a time.

Can one ECS task have multiple containers?

You can use an Amazon ECS task definition to specify multiple containers. All the containers that you specify are deployed along the same compute capacity. Don't use this feature to add multiple application containers to the same task definition because this prevents copies of each application scaling separately.


1 Answers

Yes.

AWS's documentation/product details doesn't ever come out and say it explictly, but it talks about launching many containers to a cluster. A cluster can be one instance.

When configuring a container, you specify memory and CPU usage. ECS uses that to "schedule" (or "pack") an EC2 with Docker containers.

like image 62
tedder42 Avatar answered Oct 11 '22 14:10

tedder42