Skip to content

Commit

Permalink
Avoid using autogenerated project name with docker compose plugin (#9…
Browse files Browse the repository at this point in the history
…3015) (#93017)

The docker-compose plugin uses randomized auto-generated project names
for test fixtures. This can cause issues on some platforms where it will
generate an invalid identifier. This commit simply configures the plugin
to use the gradle project name for docker compose.
  • Loading branch information
mark-vieira committed Jan 17, 2023
1 parent 051e062 commit aac9894
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public void execute(Task task) {
maybeSkipTask(dockerSupport, buildFixture);

ComposeExtension composeExtension = project.getExtensions().getByType(ComposeExtension.class);
composeExtension.setProjectName(project.getName());
composeExtension.getUseComposeFiles().addAll(Collections.singletonList(DOCKER_COMPOSE_YML));
composeExtension.getRemoveContainers().set(true);
composeExtension.getCaptureContainersOutput()
Expand Down

0 comments on commit aac9894

Please sign in to comment.