Open bpmooch opened 7 months ago
You're probably looking for inspect_container
if let Ok(inspect_response) = docker.inspect_container("container_name", None).await {
if let Ok(state) = inspect_response.state {
println!("{:?}", state.health);
}
}
(have not tried that code so expect typos, but should be close from looking at the docs)
I am writing a test that spins up a mysql container at the start, runs some tests in sequence, then stops and removes the mysql container. I am having trouble reliably connecting to the container when I start it using bollard. If I were to add a HEALTHCHECK instruction to the dockerfile of the mysql image, could I use bollard to query that status? I guess I'm searching for a good pattern to deal with the problem generally