In this blog, we will deploy a container using
docker-compose in ECS cluster.
You can follow this blog to deploy a docker container in ECS directly.
- Create new docker context
- Run docker compose to create a new ECS cluster
To run it from your local workstation, first you need to set the docker context to use the ECS to run the docker commands
Create new docker context
docker context create ecs myecs
docker context ls
docker context use myecs
docker-compose.yaml file and provide your image detail
Below command will create a ECS cluster with all other components which are required for the application like
- ECS Cluster
- VPC & Security Groups
- Task Definitions
- Load Balancer
- Target Groups
docker compose up
NOTE: For this error unexpected status code [manifests latest]: 403 Forbidden
Make sure you have logged in for your ECR repository
Cluster name is created as per your project name.