From 7c2a800e4303edcd3deb4ae8a48779c109c2daed Mon Sep 17 00:00:00 2001 From: Antoine BLONDEAU Date: Thu, 19 Dec 2024 15:07:58 +0100 Subject: [PATCH] Change image name builder to use ImageNameSubstitutor --- .../clevercloud/testcontainers/warp10/Warp10Container.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/clevercloud/testcontainers/warp10/Warp10Container.java b/src/main/java/com/clevercloud/testcontainers/warp10/Warp10Container.java index aa65b8e..4dc9bbf 100644 --- a/src/main/java/com/clevercloud/testcontainers/warp10/Warp10Container.java +++ b/src/main/java/com/clevercloud/testcontainers/warp10/Warp10Container.java @@ -11,6 +11,7 @@ import java.io.File; import java.io.IOException; import java.time.Duration; +import org.testcontainers.utility.ImageNameSubstitutor; public class Warp10Container extends GenericContainer { private static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName.parse("warp10io/warp10"); @@ -82,7 +83,9 @@ private static ImageFromDockerfile setupImage(final String tag, final File macro } } return image.withDockerfileFromBuilder(builder -> { - builder.from(DEFAULT_IMAGE_NAME.withTag(tag).asCanonicalNameString()); + builder.from(ImageNameSubstitutor.instance() + .apply(DEFAULT_IMAGE_NAME.withTag(tag)) + .asCanonicalNameString()); if (macrosFolder != null && macrosFolder.exists()) builder.add(macrosFolder.getPath(), "/opt/warp10/macros/"); if (configFolder != null && configFolder.exists())