You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run a container through this crate and abruptly shut it down with something like ctrl+c, and the containers would still be running. This leaves docker in an invalid state and either have consequences on subsequent runs or leaves a bunch of dangling containers.
Personally for me, a huge pain of testing with docker is state management. If I programmatically spin up docker containers via invoked system commands, I have to manage its state, figure out if it's actually started, free the ports, shut it down etc. This is just all not worth it for me.
The cornucopia crate, for example, uses the postgres docker to validate SQL schemas and generate sql queries at compile time, and it does this via docker containers created via std::process commands, and its auto-build feature is literally broken right now because it doesn't fully manage the state of the docker containers it created.
testcontainers solves a huge part of this problem for me but I was disappointed to see that it didn't shutdown the containers when w/e program abruptly stopped. It would be really nice if it could at least do a best effort try when this happened :)
The text was updated successfully, but these errors were encountered:
Run a container through this crate and abruptly shut it down with something like ctrl+c, and the containers would still be running. This leaves docker in an invalid state and either have consequences on subsequent runs or leaves a bunch of dangling containers.
Personally for me, a huge pain of testing with docker is state management. If I programmatically spin up docker containers via invoked system commands, I have to manage its state, figure out if it's actually started, free the ports, shut it down etc. This is just all not worth it for me.
The cornucopia crate, for example, uses the postgres docker to validate SQL schemas and generate sql queries at compile time, and it does this via docker containers created via
std::process
commands, and its auto-build feature is literally broken right now because it doesn't fully manage the state of the docker containers it created.testcontainers
solves a huge part of this problem for me but I was disappointed to see that it didn't shutdown the containers when w/e program abruptly stopped. It would be really nice if it could at least do a best effort try when this happened :)The text was updated successfully, but these errors were encountered: