简体   繁体   中英

Multiple containers in one ECS cluster

I have a single Cluster running on ECS. At the moment, I have a single task definition and a single docker container running in the cluster. I would like to deploy a second container to the same cluster that will be running entirely separately. What is the best way to achieve this?

I have tried setting up a second task definition pointing to the second image in ECR, and then setting up a second service for that definition. I'm not sure if this is the best approach.

Are there any good examples online of how to achieve the running of two separate containers in a single ECS cluster?

"I have tried setting up a second task definition pointing to the second image in ECR, and then setting up a second service for that definition. I'm not sure if this is the best approach."

Yes this is a correct way to do it, so I don't think you need any examples.

Each service uses a task definition that refers to a container in ECR (or other repo, like Docker Hub, but typically ECR).

Each service could be running any number of tasks (instances of the task definition).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM