Reputation: 42634
I am implementing a service which create Docker container for short time execution task. The service receives requests from clients and create a Docker container to run the request. Then get the response from the container and send it back to clients.
I want to limit the execution time of the Docker container for example, kill the container if it runs more than 20 minutes. Is there a configuration I can set on the container to stop in 20 minutes? Or do I have to manually calculate the execution time in my service? What is the better way to achieve that?
Upvotes: 0
Views: 1134