public static TestEnvironmentContainer create(
            boolean setupElasticsearch,
            boolean setupMinio,
            boolean setupMongo,
            boolean setupRedis,
            boolean setupTurmsAdmin,
            boolean setupTurmsGateway,
            List<String> turmsGatewayJvmOptions,
            boolean setupTurmsService,
            List<String> turmsServiceJvmOptions) {
        Path workingDir = TEMP_DIR
                // Use a subfolder in the temporary directory
                // to avoid unnecessary file copying:
                // "org.testcontainers.containers.GenericContainer.tryStart"
                // will run "copyToFileContainerPathMap.forEach(this::copyFileToContainer);"
                // to copy files under the working directory to the container.
                .resolve(UUID.randomUUID()
                        .toString());
        try {
            Files.createDirectories(workingDir);
        } catch (Exception e) {
            throw new RuntimeException(
                    "Failed to create the working directory: "
                            + workingDir,
                    e);
        }
        File dockerComposeFile;
        try {
            dockerComposeFile = workingDir.resolve("docker-compose.yaml")
                    .toFile();
            dockerComposeFile.deleteOnExit();
        } catch (Exception e) {
            throw new RuntimeException("Failed to create the temp docker compose file", e);
        }
        String config = buildDockerComposeConfig(setupElasticsearch,
                setupMinio,
                setupMongo,
                setupRedis,
                setupTurmsAdmin,
                setupTurmsGateway,
                turmsGatewayJvmOptions,
                setupTurmsService,
                turmsServiceJvmOptions);
        try {
            FileUtils.writeStringToFile(dockerComposeFile, config, StandardCharsets.UTF_8);
        } catch (IOException e) {
            throw new RuntimeException("Failed to write to the temp docker compose file", e);
        }
        return new TestEnvironmentContainer(
                workingDir,
                dockerComposeFile,
                config,
                setupElasticsearch
                        || setupMinio
                        || setupMongo
                        || setupRedis
                        || setupTurmsAdmin
                        || setupTurmsGateway
                        || setupTurmsService);
    }
@param dockerCompose TODO: Use InputStream instead of File once DockerComposeContainer
                     supports
                     (https://github.com/testcontainers/testcontainers-java/issues/3431)
turms-server-test-common/src/main/java/im/turms/server/common/testing/environment/TestEnvironmentContainer.java