Deploy images from ECR using docker compose on server

Deploy images from ECR using docker compose on server

Once we push our image on Amazon ECS we have to create docker compose yaml file to pull our image from ECS and run that image app as containerized app using docker compose on any server (dev,uat, prod environments).

Note: To find out on which port docker image is running we can 'docker run/start' that image to get port and we can use same port on host. (For defining ports on docker compose yaml)

Our docker compose file would fetch our final app image from Amazon ECS and our app can be now deployed on any dev/uat instance for testing

Steps to deploy image on dev server:

  1. Login to AWS CLI
  2. create new blank yaml file. Paste final docker compose and save.
  3. Run docker compose yaml file
  4. Your app is now running! šŸ˜„