• by SonuSitebot on 4/5/2025, 1:15:13 PM

    I've worked on a similar setup in Go — managing a pool of "always-on" containers for isolated task execution via docker exec. The official Docker SDK is solid but pretty low-level, so I get the desire for something more ergonomic. In my experience, there aren't many off-the-shelf Go libraries that give you full orchestration primitives (load balancing, health checks, scheduling) out of the box like you'd find in Nomad or K8s. But here are a few options worth exploring:

    gofiber/fiber – not container-specific, but useful for building lightweight async schedulers if you're rolling your own orchestration logic.

    dockertest – primarily for testing, but you can adapt its logic for simplified lifecycle management.

    hashicorp/go-plugin – good for decoupling workloads, especially if you're considering container-based isolation per plugin/command.

    That said, most teams I’ve seen build their own lightweight layer on top of the Docker SDK with Redis or internal queues for tracking load/health. Curious if you're doing multi-host management or keeping this local? Also, make sure to aggressively timeout and clean up zombie exec sessions — they sneak up fast when you're doing docker exec a lot.

    Would love to hear more if you open source anything from this!