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
* Remove use of deprecated (removed in 8.3) MySQL config option
* Update MySQL default images to latest
- 5.6 went EOL in Feb 2021. Stop testing against it.
- 5.7 went EOL in Oct 2023. Retain tests for a bit, but stop using it as the default.
- 8.0.34+ is now LTS rather than rolling - use this as the default for most tests
- Add 8.3.0 as a candidate "innovation" version which will eventually become LTS
* Updates various docs to use 8.0 in the examples rather than EOL 5.7.
* Update MariaDB images to latest 10.3 patch release
Fixes#8130
---------
Co-authored-by: Eddú Meléndez <[email protected]>
Copy file name to clipboardExpand all lines: docs/features/image_name_substitution.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ Consider this if:
53
53
54
54
* Developers and CI machines need to use different image names. For example, developers are able to pull images from Docker Hub, but CI machines need to pull from a private registry
55
55
* Your private registry has copies of images from Docker Hub where the names are predictable, and just adding a prefix is enough.
56
-
For example, `registry.mycompany.com/mirror/mysql:8.0.24` can be derived from the original Docker Hub image name (`mysql:8.0.24`) with a consistent prefix string: `registry.mycompany.com/mirror/`
56
+
For example, `registry.mycompany.com/mirror/mysql:8.0.36` can be derived from the original Docker Hub image name (`mysql:8.0.36`) with a consistent prefix string: `registry.mycompany.com/mirror/`
57
57
58
58
In this case, image name references in code are **unchanged**.
Copy file name to clipboardExpand all lines: docs/modules/databases/jdbc.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Insert `tc:` after `jdbc:` as follows. Note that the hostname, port and database
20
20
21
21
!!! note
22
22
We will use `///` (host-less URIs) from now on to emphasis the unimportance of the `host:port` pair.
23
-
From Testcontainers' perspective, `jdbc:mysql:5.7.34://localhost:3306/databasename` and `jdbc:mysql:5.7.34:///databasename` is the same URI.
23
+
From Testcontainers' perspective, `jdbc:mysql:8.0.36://localhost:3306/databasename` and `jdbc:mysql:8.0.36:///databasename` is the same URI.
24
24
25
25
!!! warning
26
26
If you're using the JDBC URL support, there is no need to instantiate an instance of the container - Testcontainers will do it automagically.
@@ -45,11 +45,11 @@ Insert `tc:` after `jdbc:` as follows. Note that the hostname, port and database
45
45
46
46
#### Using MariaDB
47
47
48
-
`jdbc:tc:mariadb:10.2.14:///databasename`
48
+
`jdbc:tc:mariadb:10.3.39:///databasename`
49
49
50
50
#### Using MySQL
51
51
52
-
`jdbc:tc:mysql:5.7.34:///databasename`
52
+
`jdbc:tc:mysql:8.0.36:///databasename`
53
53
54
54
#### Using MSSQL Server
55
55
@@ -92,21 +92,21 @@ Insert `tc:` after `jdbc:` as follows. Note that the hostname, port and database
92
92
93
93
Testcontainers can run an init script after the database container is started, but before your code is given a connection to it. The script must be on the classpath, and is referenced as follows:
This is useful if you have a fixed script for setting up database schema, etc.
98
98
99
99
### Using an init script from a file
100
100
101
101
If the init script path is prefixed `file:`, it will be loaded from a file (relative to the working directory, which will usually be the project root).
Instead of running a fixed script for DB setup, it may be useful to call a Java function that you define. This is intended to allow you to trigger database schema migration tools. To do this, add TC_INITFUNCTION to the URL as follows, passing a full path to the class name and method:
The init function must be a public static method which takes a `java.sql.Connection` as its only parameter, e.g.
112
112
```java
@@ -121,7 +121,7 @@ public class JDBCDriverTest {
121
121
122
122
Bydefault database container is being stopped as soon as last connection is closed. There are cases when you might need to start container and keep it running till you stop it explicitly or JVM is shutdown. Todothis, add `TC_DAEMON` parameter to the URL as follows:
Copy file name to clipboardExpand all lines: docs/modules/databases/r2dbc.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ The started container will be terminated when the `ConnectionFactory` is closed.
22
22
**Note that, unlike Testcontainers' JDBC URL support, it is not possible to specify an image tag in the 'scheme' part of the URL, and it is always necessary to specify a tag using `TC_IMAGE_TAG`.**
0 commit comments