Skip to content

On-demand starting containers, and automatic stopping of idle containers. #899

@nickgrealy

Description

@nickgrealy

Tell us about your request

I'd like the ability to "scale containers to zero".

I'd like containers to automatically be stopped after an idle period.
I'd like containers to be started on-demand, when (any of) their exposed ports are accessed.

Which service(s) is this request for?

docker engine (afaict)

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?

As a developer, I currently run a litany of services, each requiring their own dedicated memory and cpu. Some of these services are run infrequently, but still consume their reserved resources.

I'd like to free up these resources when not in use, so that other services can run smoothly (including my host operating system).

I'd like to not have to start and stop services myself.

Are you currently working around the issue?

Yes, I've vibe coded my own docker TCP proxy as a workaround. It works remarkably well (IMO), but requires additional configuration (labels) on the child containers:

Additional context

Currently I'm proposing this for standalone containers - but this would work well with docker swarm stacks as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    community_newNew idea raised by a community contributor

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions