pub struct Docker { /* private fields */ }Expand description
A Docker container: its image is built from a directory when it is not there, it runs detached, and it is removed when it stops. A database for the tests is one of these.
Implementations§
Source§impl Docker
impl Docker
pub fn new(name: &str, image: &str) -> Self
Sourcepub fn container(self, name: &str) -> Self
pub fn container(self, name: &str) -> Self
The container’s name, which a stale one of the same name is removed by.
Sourcepub fn build_from(self, dir: &str) -> Self
pub fn build_from(self, dir: &str) -> Self
Where the image is built from, if it is not there.
Sourcepub fn port(self, inside: u16, outside: u16) -> Self
pub fn port(self, inside: u16, outside: u16) -> Self
Publishes the container’s inside port as outside on this machine.
pub fn env(self, key: &str, value: &str) -> Self
pub fn ready(self, ready: Ready) -> Self
pub fn patience(self, patience: Duration) -> Self
Sourcepub fn docker_program(self, program: &str) -> Self
pub fn docker_program(self, program: &str) -> Self
Which program is Docker (for tests, and for podman).
Sourcepub fn build_args(&self) -> Option<Vec<String>>
pub fn build_args(&self) -> Option<Vec<String>>
The arguments of docker build, when there is a directory to build from.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Docker
impl RefUnwindSafe for Docker
impl Send for Docker
impl Sync for Docker
impl Unpin for Docker
impl UnsafeUnpin for Docker
impl UnwindSafe for Docker
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more