Dynamically build/run docker containers?

Hi there,

I’m trying to figure out if render.com is the right place for my service.

I run a subscription service that, when a user subscribes and presses start, should spin up 2 docker containers running preexisting programs with env vars unique to that user. When the user unsubscribes/pauses service we can delete/remove the containers. These containers need access to the internet, but they are not servers/don’t host content for the web (they just run a job indefinitely).

We should be able to add more containers programmatically as more users subscribe. I store whether a user subscribes or unsubscribes via my DB. So when a user subs or unsubs, somehow we must handle that event and create/delete the 2 containers.

Is this possible to do, and if so how?

Thank you, it’s highly appreciated.


Each Docker image would need to be its own service. If it’s just a running job with no inbound requests, then a Background Worker is probably what you’d need.

You can create, delete (or suspend) and amend env vars via the API.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.