I have setup master and slave configuration of jenkins on aws ecs. Written a job that will build docker images and push to ecr. So each time the job builds it is taking the same amount of time approx to 10 min. My jenkins master is running on container and and have used Amazon EC2 Container Service Plugin to configure slave. I have mounted the docker socket file so that the slave node will have access to docker daemon but it is not using the layer images of the ecs instance. Each time it starts from fresh.
Overview of each build:
