All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Container::exec
changed to be synchronous and returnExecOutput
- Removed all pre-defined images from the library to escape unbounded maintenance work. See testcontainers#471 for details.
0.14.0 - 2022-05-30
- Added
watchdog
feature that spawns a background thread keeping track of docker containers that are started by the test suite and removes them in the case of aCTRL+C
orkill
of the test process. - Introduced
Container::get_host_port_ipv4
,Container::get_host_port_ipv6
,ContainerState::host_port_ipv4
, andContainerState::host_port_ipv6
to better handle automatically assigned ports. Docker may bind the same exposed container port to different host ports on0.0.0.0
and::
, depending on influences from the environment.
Container::get_host_port
andContainerState::host_port
are now deprecated in favor of the new IPv4- and IPv6-specific methods.- MSRV is now 1.60.
0.13.0 - 2022-04-04
- A new client implementation that talks to the Docker daemon via HTTP.
This implementation is available as
testcontainers::clients::Http
and provides an async interface. As of now, this implementation is guarded behind theexperimental
feature-flag and not yet guaranteed to work flawlessly. - Allow using
podman
CLI in addition todocker
- The
TESTCONTAINERS
environment variable to control what happens to containers and networks at the end of a test. The default value isremove
which deletes all containers and networks that were used in the test. By setting the value tokeep
, containers and networks will not be deleted but kept running. You will have to stop and delete those yourself eventually. - Upgrade default bitcoin-core image version to 0.21.0. This allows us to remove
-debug
for bitcoind and replace it with-startupnotify=echo ...
. More details on bitcoind 0.21.0 can be found here. Note: This release also removed the default wallet. expose_port
functionality toImage
trait.Google Cloud SDK
imageRabbitMQ
imageWaitFor::Healthcheck
container ready condition, which corresponds with the healthcheck status.MinIO
image
- How images express when a container is ready: Instead of implementing
wait_until_ready
, images now need to implementready_conditions
which returns a list ofWaitFor
instances. - Return value of
get_host_port
fromOption<u16>
tou16
. If the port cannot be resolved, this function will now panic. - MSRV bumped to 1.46.
- Make
Docker
traitpub(crate)
. This reduces the API surface of the crate which allows for fewer breaking changes in the future. All functionality fromDocker
(start, stop, rm, and ports) is available on a container directly. descriptor
is broken down intoname
andtag
withinImage
trait.- Bump
MongoDB
-image default version to5.0.6
.
DYNAMODB_ADDITIONAL_SLEEP_PERIOD
variable fromdynamodb_local
image. Previously, we had a fallback of 2 seconds if this variable was not defined. We now wait for 2 seconds unconditionally after the specified message has been found.- Support for the
KEEP_CONTAINERS
env variable. The functionality ofKEEP_CONTAINERS=true
is superseded byTESTCONTAINERS=keep
. with_entrypoint
from theImage
trait. This functionality is not used within the library. Images that need this kind of customization can always implement it on their own type directly but there is no need to force it onto them.Image::EnvVars
andImage::Volumes
associated types. The respective functionsImage::env_vars
andImage::volumes
still exist but now return a trait object that must implementIterator<Item = (&String, &String)
. This allows us to provide a default implementation which reduces the boilerplate in defining new images.args
andwith_args
fromImage
trait.
- Removing a docker container did not error if failed. This was fixed by asserting the daemon's response instead of
just the status code: If a docker container was removed correctly using
rm -f -v <ID>
is printed on stdout. can either be the container name or its ID which is used within testcontainer-rs. - Fixed clippy warnings of camel case names containing a capitalized acronym.
0.12.0 - 2021-01-27
- Allow custom version for postgres image
- Remove
derivative
dependency OrientDB
imageZookeeper
image
- Move port mapping logic to
RunArgs
instead of each Image.
0.11.0 - 2020-09-30
Docker::run_with_args
method. This allows naming a container and assigning it to a specific docker network. The docker network will be created if it doesn't exist yet. Once the client is dropped, the network will be removed again if it has previously been created. A network that already existed will not be removed.- Address-type argument to
coblox/bitcoin-core
Image. We are settingbech32
as a default here. This is different from the default ofbitcoind
.
- Block the thread until containers have been successfully removed. Previously, this was done in a fire-and-forget way and hence led to containers not being removed in certain situations.
- MSRV is now 1.41.0
0.10.0 - 2020-08-20
- Mongo image.
- Support for the
fallbackfee
argument for thebitcoin-core
image. - Ability to customize the
entrypoint
used by the image. - Ability to start a container once stopped.
- MSRV bumped to 1.36 from 1.32.
- Change postgres image authentication POSTGRES_HOST_AUTH_METHOD rather than username and password.
- Bumped bitcoin-core default tag to 0.20.0.
0.9.1 - 2020-03-24
- A changelog
- Support volumes on containers
- Breaking:
Container#get_host_port
now only accepts au16
instead of au32
.u16
captures all possible port values.
- Provide a default password for the postgres image. There seems to be an unfortunate breaking change in the postgres image that we need to cater for.