This example demonstrates how to use the docker_utils crate to manage Docker containers in your Rust integration tests.
- Container lifecycle management (start, stop, check status)
- Postgres container configuration and setup
- Error handling and status verification
- Container port mapping
Make sure Docker is installed and running on your system
Run the example with Cargo:
cargo test -p docker_utils_exampleRun the example with Bazel:
bazel test //... --test_tag_filters=docker_utils_exampleThe example will:
- Start a Postgres container
- Verify it's running
- Stop the container
- Verify the container has been stopped and deleted
- docker_utils = "0.1.0"