Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: mention testcontainers-modules #523

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,19 @@ Testcontainers-rs is the official Rust language fork of [http://testcontainers.o

## Usage

### `testcontainers` is the core crate

The crate provides an API for working with containers in a test environment.

1. Depend on `testcontainers`
2. Import `use testcontainers::*`.
2. Implement `testcontainers::core::Image` for necessary docker-images
3. Run it with any available client `testcontainers::clients::*`

### Ready-to-use images

The easiest way to use `testcontainers` is to depend on ready-to-use images (aka modules).

Check [the integration tests](./testcontainers/tests) on how to use the library.
Modules are available as a community-maintained crate: [testcontainers-modules](https://github.com/testcontainers/testcontainers-rs-modules-community)

## License

Expand Down
4 changes: 3 additions & 1 deletion testcontainers/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@
//!
//! # Ecosystem
//!
//! The testcontainers ecosystem is split into multiple crates, however, the `testcontainers` crate itself is a meta-crate, re-exporting the others. Usually, depending on `testcontainers` should be sufficient for most users needs.
//! `testcontainers` is the core crate that provides an API for working with containers in a test environment.
//! However, it does not provide ready-to-use modules, you can implement your [`Image`]s using the library directly or use community supported [`testcontainers-modules`].
//!
//! [tc_website]: https://testcontainers.org
//! [`Docker`]: https://docker.com
//! [docker_run]: trait.Docker.html#tymethod.run
//! [`Client`]: trait.Docker.html#implementors
//! [`Images`]: trait.Image.html#implementors
//! [`Container`]: struct.Container.html
//! [`testcontainers-modules`]: https://crates.io/crates/testcontainers-modules
pub use crate::core::{Container, Image, ImageArgs, RunnableImage};

#[cfg(feature = "experimental")]
Expand Down
Loading