diff --git a/src/main/kotlin/tasks/DockerCompose.kt b/src/main/kotlin/tasks/DockerCompose.kt index 45c78d8..219a0cb 100644 --- a/src/main/kotlin/tasks/DockerCompose.kt +++ b/src/main/kotlin/tasks/DockerCompose.kt @@ -152,7 +152,7 @@ abstract class DockerCompose : DockerClient() { fun pull() = dockerCompose.services.keys.mapNotNull { name -> // Find services that do not match any projects and pull them as they must refer to an external image. // Other images will be provided by dependency on the image digests. - if (project.allprojects.none { it.isDockerProject && it.name == name }) name else null + if (project.rootProject.allprojects.none { it.isDockerProject && it.name == name }) name else null }.let { services -> if (services.isNotEmpty()) { invoke("pull", *services.toTypedArray())