Autoscaling to 0, if no requests

Dear friends of,
it is some kind OT, but you never know…

I want to deploy a container with Tomcat, which is automatically will go down (and free resources) if there wasn’t http request for a certain period of time. But: it must also automatically start when a http request arrives.

How can Docker help me to deploy such application? Which other tools Do I need?

Thank You very much in advance.

JeMo