Multiple deployments in a day and auto prune container and image

Hi Friends,

I am new to Docker and I have requirement of implementing continuous delivery.

We are working on an Augular UI project and we have a release branch and N number of feature branches. Our strategy is, each developer work on their feature branch and push all their commits ot their feature branch and it auto triggers a job in Jenkins to build the UI code(just a sanity build). Since we have more than 30 feature branches, in an hour of time we have around 5 builds and currently planning for the deployment of each feature build, however, we do not have enough environments to deploy artifacts from each build, so we are planning to go with docker.

Problem is, for each build, it will create an image and run it in container and at the end of each day it will be around 30 or 40 builds will happen(as we are building for every push to each feature branch).

So we need a mechanism to deploy our app in a container it should run for 30 mins and it has to be auto pruned from container and also the respective image as well.

Please give me an workflow or reference link to achieve this…