From 32b655190ddc7d2b24d136370cf4ca562a536903 Mon Sep 17 00:00:00 2001 From: "Gregor B. Rosenauer" Date: Tue, 1 Aug 2017 17:38:54 +0200 Subject: [PATCH] making docker compose container configurable, fixes #422 (#425) --- .../org/testcontainers/containers/DockerComposeContainer.java | 2 +- .../testcontainers/utility/TestcontainersConfiguration.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/testcontainers/containers/DockerComposeContainer.java b/core/src/main/java/org/testcontainers/containers/DockerComposeContainer.java index 42f42c71398..f34149c3900 100644 --- a/core/src/main/java/org/testcontainers/containers/DockerComposeContainer.java +++ b/core/src/main/java/org/testcontainers/containers/DockerComposeContainer.java @@ -396,7 +396,7 @@ default void validateFileList(List composeFiles) { class ContainerisedDockerCompose extends GenericContainer implements DockerCompose { public ContainerisedDockerCompose(List composeFiles, String identifier) { - super("docker/compose:1.8.0"); + super(TestcontainersConfiguration.getInstance().getDockerComposeContainerImage()); validateFileList(composeFiles); addEnv(ENV_PROJECT_NAME, identifier); diff --git a/core/src/main/java/org/testcontainers/utility/TestcontainersConfiguration.java b/core/src/main/java/org/testcontainers/utility/TestcontainersConfiguration.java index a47b2b90637..bb7acb0bc9e 100644 --- a/core/src/main/java/org/testcontainers/utility/TestcontainersConfiguration.java +++ b/core/src/main/java/org/testcontainers/utility/TestcontainersConfiguration.java @@ -34,6 +34,10 @@ public String getVncRecordedContainerImage() { return (String) properties.getOrDefault("vncrecorder.container.image", "richnorth/vnc-recorder:latest"); } + public String getDockerComposeContainerImage() { + return (String) properties.getOrDefault("compose.container.image", "docker/compose:1.8.0"); + } + public String getTinyImage() { return (String) properties.getOrDefault("tinyimage.container.image", "alpine:3.5"); }