From 803cd2399b8cedfd6265b6dcc227b9fc97ec9a18 Mon Sep 17 00:00:00 2001 From: Fedor Dudinskiy Date: Tue, 25 Oct 2022 11:16:45 +0200 Subject: [PATCH] Use fully-qualified image names Solves https://github.com/quarkus-qe/quarkus-test-framework/issues/604 --- .../containers/ConfluentKafkaContainerManagedResource.java | 6 +++++- .../test/services/containers/model/KafkaRegistry.java | 2 +- .../quarkus/test/services/containers/model/KafkaVendor.java | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/quarkus-test-service-kafka/src/main/java/io/quarkus/test/services/containers/ConfluentKafkaContainerManagedResource.java b/quarkus-test-service-kafka/src/main/java/io/quarkus/test/services/containers/ConfluentKafkaContainerManagedResource.java index 3765206f0..25ddeedb4 100644 --- a/quarkus-test-service-kafka/src/main/java/io/quarkus/test/services/containers/ConfluentKafkaContainerManagedResource.java +++ b/quarkus-test-service-kafka/src/main/java/io/quarkus/test/services/containers/ConfluentKafkaContainerManagedResource.java @@ -20,7 +20,11 @@ public String getDisplayName() { @Override protected GenericContainer initKafkaContainer() { - return new KafkaContainer(DockerImageName.parse(getKafkaImage() + ":" + getKafkaVersion())) + DockerImageName imageName = DockerImageName + .parse(getKafkaImage() + ":" + getKafkaVersion()) + // todo https://github.com/testcontainers/testcontainers-java/issues/5612 + .asCompatibleSubstituteFor("confluentinc/cp-kafka"); + return new KafkaContainer(imageName) .withCreateContainerCmdModifier(cmd -> cmd.withName(DockerUtils.generateDockerContainerName())); } diff --git a/quarkus-test-service-kafka/src/main/java/io/quarkus/test/services/containers/model/KafkaRegistry.java b/quarkus-test-service-kafka/src/main/java/io/quarkus/test/services/containers/model/KafkaRegistry.java index 44a1d6c10..663815878 100644 --- a/quarkus-test-service-kafka/src/main/java/io/quarkus/test/services/containers/model/KafkaRegistry.java +++ b/quarkus-test-service-kafka/src/main/java/io/quarkus/test/services/containers/model/KafkaRegistry.java @@ -1,7 +1,7 @@ package io.quarkus.test.services.containers.model; public enum KafkaRegistry { - CONFLUENT("confluentinc/cp-schema-registry", "6.1.1", "/", 8081), + CONFLUENT("docker.io/confluentinc/cp-schema-registry", "6.1.1", "/", 8081), APICURIO("quay.io/apicurio/apicurio-registry-mem", "2.2.5.Final", "/apis", 8080); private final String image; diff --git a/quarkus-test-service-kafka/src/main/java/io/quarkus/test/services/containers/model/KafkaVendor.java b/quarkus-test-service-kafka/src/main/java/io/quarkus/test/services/containers/model/KafkaVendor.java index 3e1781a35..e588a0cb0 100644 --- a/quarkus-test-service-kafka/src/main/java/io/quarkus/test/services/containers/model/KafkaVendor.java +++ b/quarkus-test-service-kafka/src/main/java/io/quarkus/test/services/containers/model/KafkaVendor.java @@ -1,7 +1,7 @@ package io.quarkus.test.services.containers.model; public enum KafkaVendor { - CONFLUENT("confluentinc/cp-kafka", "7.2.2", 9093, KafkaRegistry.CONFLUENT), + CONFLUENT("docker.io/confluentinc/cp-kafka", "7.2.2", 9093, KafkaRegistry.CONFLUENT), STRIMZI("quay.io/strimzi/kafka", "0.31.1-kafka-3.1.2", 9092, KafkaRegistry.APICURIO); private final String image;