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
Copy file name to clipboardExpand all lines: testcontainers/src/lib.rs
+11-2Lines changed: 11 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,13 @@
22
22
//!
23
23
//! Unsurprisingly, working with testcontainers is very similar to working with Docker itself.
24
24
//!
25
-
//! First, you need to define the [`Image`] that you want to run, and then simply call the `start` method on it from either the [`AsyncRunner`] or [`SyncRunner`] trait.
25
+
//! If you need to build an image first, then you need to define the [`BuildableImage`] that specifies the build context
26
+
//! and the Dockerfile, then call the `build_image` method on it from either the [`AsyncBuilder`] or [`SyncBuilder`] trait.
27
+
//! This will yield an [`Image`] you could actually start.
28
+
//!
29
+
//! If you already have a Docker image you can just define your [`Image`] that you want to run, and then simply call the
30
+
//! `start` method on it from either the [`AsyncRunner`] or [`SyncRunner`] trait.
31
+
//!
26
32
//! This will return you [`ContainerAsync`] or [`Container`] respectively.
27
33
//! Containers implement `Drop`. As soon as they go out of scope, the underlying docker container is removed.
28
34
//! To disable this behavior, you can set ENV variable `TESTCONTAINERS_COMMAND` to `keep`.
@@ -60,7 +66,8 @@
60
66
//! # Ecosystem
61
67
//!
62
68
//! `testcontainers` is the core crate that provides an API for working with containers in a test environment.
63
-
//! The only image that is provided by the core crate is the [`GenericImage`], which is a simple wrapper around any docker image.
69
+
//! The only buildable image and image implementations that are provided by the core crate are the [`GenericBuildableImage`]
70
+
//! and [`GenericImage`], respectively.
64
71
//!
65
72
//! 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`].
0 commit comments