Skip to content

Commit

Permalink
Change image name builder to use ImageNameSubstitutor
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine BLONDEAU committed Dec 19, 2024
1 parent 2a7b4fa commit 7c2a800
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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<Warp10Container> {
private static final DockerImageName DEFAULT_IMAGE_NAME = DockerImageName.parse("warp10io/warp10");
Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit 7c2a800

Please sign in to comment.