LXC time limit of life

Good day,

is it possible to define the time after which the container is automatically switched off and deleted?

Example:
The customer will create a container, but it would be valid for only 1 hour. It automatically shuts off and clears after one hour.

I can do this via the API after an hour. But I would like to ask if there is a built-in function

There’s no built-in function to do this.

The only place where we’ve ever needed something like that was for https://linuxcontainers.org/lxd/try-it/ and for that one, it’s the service which creates the different containers which also takes care of deleting them when their time is up.

hi,

This is exactly the example I mean.

Thank you for your response. So we will solve at the API level.