#docker #testcontainers

dev tc_cli_client

An implementation of the testcontainers Docker trait that uses the Docker CLI to issue the necessary commands to the docker daemon

3 unstable releases

0.2.0 Feb 28, 2019
0.1.1 Oct 23, 2018
0.1.0 Oct 3, 2018

#48 in Testing

45 downloads per month
Used in 11 crates (1 directly)


431 lines


Build Status Crates.io Docs.rs Dependabot Status

Testcontainers-rs is the official Rust language fork of http://testcontainers.org.


TL:DR: Depend on testcontainers, this will give you everything you need.

Check the integration tests on how to use the library.


The repository is structured into the several crates.

  • core: Contains the core traits and structs necessary for the testcontainers ecosystem.
  • cli_client: Contains an implementation of the Docker trait that uses the docker-CLI to issue commands.
  • The folder images contains several crates named after the respective docker image. Each crate adds support for one particular image. This allows to selectively import the images you need.

Last but not least: testcontainers: This is a meta crate that bundles all these crates together for convenient usage.


To not make it too inconvenient, the meta crate testcontainers cannot strictly follow semver. Thus you are encouraged to at least depend on the minor version of the library, i.e. X.Y. If you are interested in this crate versioning approach, checkout the release guide.


Licensed under either of

at your option.


While developing, please make sure that your code is formatted using cargo-fmt. You can easily do that by using the pre-defined git hooks:

git config core.hookspath .githooks


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


~34K SLoC