waitContainerCmd is useless when container has autoRemove or is short lived #2356
Open
Description
Because we can not change the condition
of wait (https://docs.docker.com/reference/api/engine/version/v1.43/#tag/Container/operation/ContainerWait), if the container is destroyed before wait can be used, then we have no way to get the status code.
Also, the fact that we need to exec waitContainerCmd after the container start, is weird.
In my case, I have overridden the WaitContainerCmdExec
class so the condition to be next-exit
for my use case. With this, I am able to start waiting before starting the container and therefore get the status code.
I recommend having a way to set the condition on wait container.
Metadata
Assignees
Labels
No labels