From 203cb0644201c8f3edbea86c7eb8e291bdd92ba7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 13:45:45 +0000 Subject: [PATCH 1/2] [#2270] Change docker image to container-registry.oracle.com/mysql/community-server:9.3.0 from `docker.io/mysql:9.2.0` to `container-registry.oracle.com/mysql/community-server:9.3.0` I found the registry in the official MySQL documentation: https://dev.mysql.com/doc/refman/9.3/en/docker-mysql-getting-started.html#docker-download-image The one from docker.io doesn't seem to work with testcontainers. --- .github/workflows/build.yml | 3 +-- .../java/org/hibernate/reactive/containers/MySQLDatabase.java | 2 +- tooling/docker/mysql.Dockerfile | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fd4205415..9e1f766dc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,8 +52,7 @@ jobs: services: # Label used to access the service container mysql: - # Docker Hub image - image: mysql:9.2.0 + image: container-registry.oracle.com/mysql/community-server:9.3.0 env: MYSQL_ROOT_PASSWORD: hreact MYSQL_DATABASE: hreact diff --git a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/containers/MySQLDatabase.java b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/containers/MySQLDatabase.java index f5cd8f7c7..5b5ad5d2c 100644 --- a/hibernate-reactive-core/src/test/java/org/hibernate/reactive/containers/MySQLDatabase.java +++ b/hibernate-reactive-core/src/test/java/org/hibernate/reactive/containers/MySQLDatabase.java @@ -87,7 +87,7 @@ class MySQLDatabase implements TestableDatabase { * TIP: To reuse the same containers across multiple runs, set `testcontainers.reuse.enable=true` in a file located * at `$HOME/.testcontainers.properties` (create the file if it does not exist). */ - public static final MySQLContainer mysql = new MySQLContainer<>( fromDockerfile( "mysql" ) ) + public static final MySQLContainer mysql = new MySQLContainer<>( fromDockerfile( "mysql" ).asCompatibleSubstituteFor( "mysql" ) ) .withUsername( DatabaseConfiguration.USERNAME ) .withPassword( DatabaseConfiguration.PASSWORD ) .withDatabaseName( DatabaseConfiguration.DB_NAME ) diff --git a/tooling/docker/mysql.Dockerfile b/tooling/docker/mysql.Dockerfile index 966350a87..69b12ca62 100644 --- a/tooling/docker/mysql.Dockerfile +++ b/tooling/docker/mysql.Dockerfile @@ -1,3 +1,3 @@ # MySQL # See https://hub.docker.com/_/mysql -FROM docker.io/mysql:9.2.0 +FROM container-registry.oracle.com/mysql/community-server:9.3.0 From 0d836fec0c84f145603a4b2d8c070c87cd41cf0f Mon Sep 17 00:00:00 2001 From: Davide D'Alto Date: Tue, 15 Jul 2025 10:14:05 +0200 Subject: [PATCH 2/2] [#2270] Update JBang templates MySQL docker image to `container-registry.oracle.com/mysql/community-server:9.3.0` --- tooling/jbang/MySQLReactiveTest.java.qute | 2 +- tooling/jbang/ReactiveTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tooling/jbang/MySQLReactiveTest.java.qute b/tooling/jbang/MySQLReactiveTest.java.qute index 34865636f..00d82a12b 100755 --- a/tooling/jbang/MySQLReactiveTest.java.qute +++ b/tooling/jbang/MySQLReactiveTest.java.qute @@ -72,7 +72,7 @@ public class {baseName} { } @ClassRule - public final static MySQLContainer database = new MySQLContainer<>( imageName( "docker.io", "mysql", "9.2.0" ) ); + public final static MySQLContainer database = new MySQLContainer<>( imageName( "container-registry.oracle.com", "mysql/community-server", "9.3.0" ).asCompatibleSubstituteFor( "mysql" ) ); private Mutiny.SessionFactory sessionFactory; diff --git a/tooling/jbang/ReactiveTest.java b/tooling/jbang/ReactiveTest.java index 8db2eedc9..87c8659a3 100755 --- a/tooling/jbang/ReactiveTest.java +++ b/tooling/jbang/ReactiveTest.java @@ -229,7 +229,7 @@ public String toString() { */ enum Database { POSTGRESQL( () -> new PostgreSQLContainer( "postgres:17.5" ) ), - MYSQL( () -> new MySQLContainer( "mysql:9.2.0" ) ), + MYSQL( () -> new MySQLContainer( "container-registry.oracle.com/mysql/community-server:9.3.0" ) ), DB2( () -> new Db2Container( "docker.io/icr.io/db2_community/db2:12.1.0.0" ).acceptLicense() ), MARIADB( () -> new MariaDBContainer( "mariadb:11.7.2" ) ), COCKROACHDB( () -> new CockroachContainer( "cockroachdb/cockroach:v24.3.13" ) );