View Source Testcontainers.Container (testcontainers v1.4.1)
A struct with builder functions for creating a definition of a container.
Summary
Functions
Gets the host port on the container for the given exposed port.
A constructor function to make it easier to construct a container
Sets whether the container should be automatically removed on exit.
Sets a file or the directory on the host machine to be mounted into a container.
Sets a volume to be mounted into a container on target path
Sets a cmd to run when the container starts.
Sets an environment variable to the container.
Adds a port to be exposed on the container.
Adds multiple ports to be exposed on the container.
Adds a fixed port to be exposed on the container.
Sets a label to apply to the container object in docker.
Sets multiple waiting strategies for the container.
Sets a waiting strategy for the container.
Functions
Gets the host port on the container for the given exposed port.
A constructor function to make it easier to construct a container
Sets whether the container should be automatically removed on exit.
with_bind_mount(config, host_src, container_dest, options \\ "ro")
View SourceSets a file or the directory on the host machine to be mounted into a container.
with_bind_volume(config, volume, container_dest, read_only \\ false)
View SourceSets a volume to be mounted into a container on target path
Sets a cmd to run when the container starts.
Sets an environment variable to the container.
Adds a port to be exposed on the container.
Adds multiple ports to be exposed on the container.
Adds a fixed port to be exposed on the container.
Sets a label to apply to the container object in docker.
Sets multiple waiting strategies for the container.
Sets a waiting strategy for the container.