Stop the container once the last 'podman exec' finishes #26589
-
Currently, once a Toolbx container gets started with This becomes annoying if someone tries to remove the container because commands like I have devised a solution to this with a system of reference counting based on two advisory file locks. It lets the Toolbx container's entry point keep track of what's happening on the host, and it's able to exit when the last I suppose one alternative is to pass a Before I merge it, I am wondering if Podman already has some other facilities for this that I am missing. Does it? I have seen the original coreos/toolbox script unconditionally invoke Is there any other prior art I should know about? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
Beta Was this translation helpful? Give feedback.
-
I think this discussion can be closed if nobody else comes up with anything else. |
Beta Was this translation helpful? Give feedback.
podman inspect --format {{.ExecIDs}} <name>
that shows a list of all tacked execIDs. If it is empty you can stop it so you don't need your own reference counter.