Hi all, I am spinning up a few docker containers using exec package. Based on the outcome of success or failure of this step, I would like to proceed with further actions like interacting with the containers. My doubt is, whether shall I make use of context in this scenario and add sub-contexts down the line? Is this a good use of context package? Can you also point out any examples similar to this?
Thanks in advance!
Contexts might help you or they might not. Ironically, I don’t believe there is enough context in your question for me (or others in the community) to tell you how to effectively use the context package. You might be able to put together a “container hypervisor” that runs either on the host, or in a container of its own, that monitors the other containers with a web service in which you could utilize the context package to control cancellation, timeouts, retries, etc. Depending on how big or small these containers are, you might drive this with a single context per container or create a sort of actor model with a tree of contexts that can shutdown their child workers and restart them on failure.
Without more information (and preferably code) about what you’re looking for, what you’ve tried, and why you’re looking for alternatives, I don’t believe anyone can provide you with suggestions that aren’t equally vague.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.