What's Changed
This release includes a fix for a breaking change that appeared in Docker for Mac v2.4.0.0 (#3159). We recommend upgrading to this version of Testcontainers ASAP.
๐ Features & Enhancements
-
Add image compatibility checks (#3021) @rnorth
The majority of modules make assumptions about the container image being used - for example, port numbers, expected log lines, etc. When asking users to provide their own images with modules, it is potentially confusing if the provided image diverges from the original 'vendor-provided' image that the module was built to support.This change is intended to ensure that, if the user provides their own image that is not the same as the vendor-provided one, they are given adequate warning and forced to signal that this is intentional.
For example:
new KafkaContainer(DockerImageName.parse("confluentinc/cp-kafka:any"))
will just work, becauseconfluentinc/cp-kafka
matches the image name thatKafkaContainer
was designed to work with- but
new KafkaContainer(DockerImageName.parse("some-other-kafka"))
will not work immediately, becausesome-other-kafka
may be an entirely divergent image fromconfluentinc/cp-kafka
. In this case, the user would be prompted to add.asCompatibleSubstituteFor("confluentinc/cp-kafka")
which tells Testcontainers that this is a conscious decision
This PR adds to DockerImageName:
asCompatibleSubstituteFor(DockerImageName)
andasCompatibleSubstituteFor(String)
methods which may be used to claim compatibility with a vendor-provided imageisCompatibleWith(DockerImageName)
andassertCompatibleWith(DockerImageName)
methods which can be used by Testcontainers to check that the provided image is compatible with the expected vendor-provided image
-
Add support for Docker compose
withOptions(...)
(#2827) @Gapmeister66
โ ๏ธ Deprecations
๐ Bug Fixes
- Fix bind mounts for ResourceReaper/ryuk and ContainerisedDockerCompose on macOS (#3159) @gesellix
- Remove dependency upon internet URLs for selenium tests (#3271) @rnorth
- #3057 Fix jetbrains annotations configuration scope (#3157) @wpanas
- Whitespace configuration fix (#3127, fixes #3053) (#3127) @artjomka
๐ Documentation
- Remove use of implicit network for multi-container Kafka (#3128) @iaintatchbbc
- #3129 Fix dead link for CircleCI configuration (#3156) @wpanas
๐งน Housekeeping
- Make testMatrix task emit all check tasks, rather than filtering out up-to-date tasks (#3287) @rnorth
- Remove dependency upon internet URLs for selenium tests (#3271) @rnorth
- Use testCompileClasspath instead of testCompileOnly (#3219) @colltoaction
- Add some more logs to bash script used for DockerHealthcheckWaitStratgyTest (#2988) @kiview
- Fix the Rootless Docker CI job (#3050) @bsideup
- Add continue-on-error for cache step, and upgrade GH cache action (#3133) @rnorth
๐ฆ Dependency updates
- Bump aws-java-sdk-s3 from 1.11.865 to 1.11.870 in /modules/localstack (#3285) @dependabot
- Bump aws-java-sdk-s3 from 1.11.860 to 1.11.865 in /modules/localstack (#3255) @dependabot
- Bump s3 from 2.14.16 to 2.14.21 in /modules/localstack (#3254) @dependabot
- Bump mockito-core from 3.5.7 to 3.5.11 in /core (#3250) @dependabot
- Bump cucumber-junit from 6.6.0 to 6.7.0 in /examples (#3246) @dependabot
- Bump okhttp from 4.8.1 to 4.9.0 in /examples (#3245) @dependabot
- Bump solr-solrj from 8.6.1 to 8.6.2 in /examples (#3244) @dependabot
- Bump mockito-core from 3.5.10 to 3.5.11 in /modules/junit-jupiter (#3243) @dependabot
- Bump aws-java-sdk-dynamodb from 1.11.860 to 1.11.865 in /modules/dynalite (#3242) @dependabot
- Bump assertj-core from 3.17.1 to 3.17.2 in /modules/pulsar (#3192) @dependabot
- Bump aws-java-sdk-s3 from 1.11.856 to 1.11.860 in /modules/localstack (#3226) @dependabot
- Bump assertj-core from 3.17.1 to 3.17.2 in /modules/database-commons (#3197) @dependabot
- Bump assertj-core from 3.17.1 to 3.17.2 in /modules/junit-jupiter (#3199) @dependabot
- Bump assertj-core from 3.17.1 to 3.17.2 in /modules/kafka (#3200) @dependabot
- Bump cucumber-java from 6.4.0 to 6.6.0 in /examples (#3213) @dependabot
- Bump r2dbc-postgresql from 0.8.4.RELEASE to 0.8.5.RELEASE in /modules/postgresql (#3230) @dependabot
- Bump s3 from 2.14.12 to 2.14.16 in /modules/localstack (#3231) @dependabot
- Bump junit-jupiter-api from 5.6.2 to 5.7.0 in /modules/junit-jupiter (#3233) @dependabot
- Bump junit-jupiter-params from 5.6.2 to 5.7.0 in /modules/junit-jupiter (#3232) @dependabot
- Bump aws-java-sdk-dynamodb from 1.11.856 to 1.11.860 in /modules/dynalite (#3235) @dependabot
- Bump postgresql from 42.2.15 to 42.2.16 in /examples (#3216) @dependabot
- Bump junit-jupiter-engine from 5.6.2 to 5.7.0 in /modules/junit-jupiter (#3234) @dependabot
- Bump cucumber-junit from 6.4.0 to 6.6.0 in /examples (#3215) @dependabot
- Bump aws-java-sdk-sqs from 1.11.851 to 1.11.860 in /modules/localstack (#3227) @dependabot
- Bump assertj-core from 3.17.1 to 3.17.2 in /modules/vault (#3193) @dependabot
- Bump mockito-core from 3.5.7 to 3.5.10 in /modules/junit-jupiter (#3201) @dependabot
- Bump aws-java-sdk-s3 from 1.11.852 to 1.11.856 in /modules/localstack (#3203) @dependabot
- Bump s3 from 2.14.8 to 2.14.12 in /modules/localstack (#3202) @dependabot
- Bump aws-java-sdk-dynamodb from 1.11.851 to 1.11.856 in /modules/dynalite (#3194) @dependabot
- Bump annotations from 20.0.0 to 20.1.0 in /modules/mysql (#3198) @dependabot
- Bump annotations from 20.0.0 to 20.1.0 in /modules/selenium (#3195) @dependabot
- Bump annotations from 20.0.0 to 20.1.0 in /modules/jdbc (#3196) @dependabot
- Bump annotations from 20.0.0 to 20.1.0 in /examples (#3217) @dependabot
- Bump annotations from 20.0.0 to 20.1.0 in /modules/postgresql (#3207) @dependabot
- Bump annotations from 20.0.0 to 20.1.0 in /modules/nginx (#3206) @dependabot
- Bump annotations from 20.0.0 to 20.1.0 in /modules/spock (#3204) @dependabot
- Bump annotations from 20.0.0 to 20.1.0 in /core (#3214) @dependabot
- Bump assertj-core from 3.16.1 to 3.17.1 in /core (#3210) @dependabot
- Bump elasticsearch-rest-client from 7.9.0 to 7.9.1 in /modules/elasticsearch (#3212) @dependabot
- Bump assertj-core from 3.17.1 to 3.17.2 in /modules/neo4j (#3208) @dependabot
- Bump aws-java-sdk-s3 from 1.11.847 to 1.11.852 in /modules/localstack (#3182) @dependabot
- Bump s3 from 2.14.6 to 2.14.8 in /modules/localstack (#3181) @dependabot
- Bump assertj-core from 3.17.0 to 3.17.1 in /modules/kafka (#3175) @dependabot
- Bump assertj-core from 3.17.0 to 3.17.1 in /modules/pulsar (#3176) @dependabot
- Bump assertj-core from 3.17.0 to 3.17.1 in /modules/junit-jupiter (#3177) @dependabot
- Bump assertj-core from 3.17.0 to 3.17.1 in /modules/vault (#3173) @dependabot
- Bump assertj-core from 3.17.0 to 3.17.1 in /modules/database-commons (#3168) @dependabot
- Bump assertj-core from 3.17.0 to 3.17.1 in /modules/neo4j (#3167) @dependabot
- Bump aws-java-sdk-sqs from 1.11.846 to 1.11.851 in /modules/localstack (#3171) @dependabot
- Bump aws-java-sdk-dynamodb from 1.11.847 to 1.11.851 in /modules/dynalite (#3172) @dependabot
- Bump mssql-jdbc from 8.3.1.jre8-preview to 8.4.1.jre8 in /modules/mssqlserver (#3174) @dependabot
- Bump assertj-core from 3.16.1 to 3.17.0 in /modules/database-commons (#3141) @dependabot
- Bump assertj-core from 3.16.1 to 3.17.0 in /modules/neo4j (#3137) @dependabot
- Bump s3 from 2.13.76 to 2.14.6 in /modules/localstack (#3162) @dependabot
- Bump assertj-core from 3.16.1 to 3.17.0 in /modules/kafka (#3139) @dependabot
- Bump mockito-core from 3.5.5 to 3.5.7 in /modules/junit-jupiter (#3163) @dependabot
- Bump postgresql from 42.2.15 to 42.2.16 in /modules/spock (#3138) @dependabot
- Bump mockito-core from 3.5.0 to 3.5.7 in /core (#3164) @dependabot
- Bump pulsar-client from 2.6.0 to 2.6.1 in /modules/pulsar (#3155) @dependabot
- Bump mockito-core from 3.5.2 to 3.5.5 in /modules/junit-jupiter (#3143) @dependabot
- Bump assertj-core from 3.16.1 to 3.17.0 in /modules/junit-jupiter (#3144) @dependabot
- Bump postgresql from 42.2.15 to 42.2.16 in /modules/postgresql (#3145) @dependabot
- Bump assertj-core from 3.16.1 to 3.17.0 in /modules/vault (#3146) @dependabot
- Bump pulsar-client-admin from 2.6.0 to 2.6.1 in /modules/pulsar (#3154) @dependabot
- Bump elasticsearch-rest-client from 7.8.0 to 7.9.0 in /modules/elasticsearch (#3152) @dependabot
- Bump postgresql from 42.2.15 to 42.2.16 in /modules/junit-jupiter (#3142) @dependabot
- Bump aws-java-sdk-s3 from 1.11.846 to 1.11.847 in /modules/localstack (#3148) @dependabot
- Bump aws-java-sdk-dynamodb from 1.11.837 to 1.11.847 in /modules/dynalite (#3150) @dependabot
- Bump assertj-core from 3.16.1 to 3.17.0 in /modules/pulsar (#3153) @dependabot
- Bump postgresql from 42.2.14 to 42.2.15 in /modules/spock (#3119) @dependabot
- Bump influxdb-java from 2.19 to 2.20 in /modules/influxdb (#3120) @dependabot
- Bump org.springframework.boot from 2.3.2.RELEASE to 2.3.3.RELEASE in /examples (#3111) @dependabot
- Bump mockito-core from 3.4.4 to 3.5.2 in /modules/junit-jupiter (#3130) @dependabot
- Bump postgresql from 42.2.14 to 42.2.15 in /modules/junit-jupiter (#3115) @dependabot
- Bump postgresql from 42.2.14 to 42.2.15 in /modules/postgresql (#3113) @dependabot
- Bump cucumber-java from 6.2.2 to 6.4.0 in /examples (#3112) @dependabot
- Bump aws-java-sdk-sqs from 1.11.831 to 1.11.846 in /modules/localstack (#3132) @dependabot
- Bump aws-java-sdk-s3 from 1.11.837 to 1.11.846 in /modules/localstack (#3131) @dependabot
- Bump s3 from 2.13.61 to 2.13.76 in /modules/localstack (#3114) @dependabot
- Bump solr-solrj from 8.5.2 to 8.6.1 in /examples (#3107) @dependabot
- Bump aws-java-sdk-dynamodb from 1.11.827 to 1.11.837 in /modules/dynalite (#3090) @dependabot
- Bump okhttp from 4.8.0 to 4.8.1 in /examples (#3106) @dependabot
- Bump cucumber-junit from 6.2.2 to 6.4.0 in /examples (#3109) @dependabot
- Bump postgresql from 42.2.14 to 42.2.15 in /examples (#3108) @dependabot
- Bump mockito-core from 3.4.6 to 3.5.0 in /core (#3105) @dependabot
- Bump mongo-java-driver from 3.12.6 to 3.12.7 in /core (#3104) @dependabot
- Bump aws-java-sdk-s3 from 1.11.831 to 1.11.837 in /modules/localstack (#3088) @dependabot
- Bump kafka-clients from 2.5.0 to 2.6.0 in /modules/kafka (#3085) @dependabot
- Bump aws-java-sdk-dynamodb from 1.11.816 to 1.11.827 in /modules/dynalite (#3027) @dependabot
- Bump mongo-java-driver from 3.12.5 to 3.12.6 in /core (#3024) @dependabot
- Bump mockito-core from 3.3.3 to 3.4.6 in /core (#3065) @dependabot
- Bump r2dbc-mysql from 0.8.1.RELEASE to 0.8.2.RELEASE in /modules/mysql (#3046) @dependabot
- Bump aws-java-sdk-s3 from 1.11.816 to 1.11.831 in /modules/localstack (#3064) @dependabot
- Bump aws-java-sdk-sqs from 1.11.812 to 1.11.831 in /modules/localstack (#3063) @dependabot
- Bump mysql-connector-java from 8.0.20 to 8.0.21 in /modules/jdbc-test (#3044) @dependabot
- Bump mysql-connector-java from 8.0.20 to 8.0.21 in /modules/mysql (#3045) @dependabot
- Bump mockito-core from 3.3.3 to 3.4.4 in /modules/junit-jupiter (#3038) @dependabot
- Bump org.springframework.boot from 2.3.1.RELEASE to 2.3.2.RELEASE in /examples (#3039) @dependabot
- Bump mysql-connector-java from 8.0.20 to 8.0.21 in /modules/junit-jupiter (#3037) @dependabot
- Bump r2dbc-mariadb from 0.8.2-alpha2 to 0.8.3-beta1 in /modules/mariadb (#3036) @dependabot
- Bump mariadb-java-client from 2.6.1 to 2.6.2 in /modules/mariadb (#3034) @dependabot
- Bump r2dbc-postgresql from 0.8.3.RELEASE to 0.8.4.RELEASE in /modules/postgresql (#3035) @dependabot
- Bump mysql-connector-java from 8.0.20 to 8.0.21 in /modules/spock (#3032) @dependabot
- Bump r2dbc-mssql from 0.8.3.RELEASE to 0.8.4.RELEASE in /modules/mssqlserver (#3033) @dependabot
- Bump okhttp from 4.7.2 to 4.8.0 in /examples (#3042) @dependabot
- Bump s3 from 2.13.50 to 2.13.61 in /modules/localstack (#3028) @dependabot
- Bump commons-lang3 from 3.10 to 3.11 in /modules/jdbc-test (#3043) @dependabot
- Bump cucumber-junit from 6.1.1 to 6.2.2 in /examples (#3041) @dependabot
- Bump cucumber-java from 6.1.1 to 6.2.2 in /examples (#3040) @dependabot