protected override async Task <string> runCore(DockerClient docker, CancellationToken timeout, string solutionFolderToMount) { await using var containerNetwork = await NetworkCreationHelper.CreateNewNetwork(logger, docker, timeout); await using var serviceContainer = await ContainerCreationHelper.CreateNewContainer(task.ServiceContainer !, docker, logger, timeout); await containerNetwork.ConnectContainer(serviceContainer.Id, task.ServiceContainer !.Name, timeout); await serviceContainer.StartContainer(timeout); await using var mainContainer = await ContainerCreationHelper.CreateNewContainer(task.Container, docker, logger, timeout, cp => configureMount(cp, solutionFolderToMount)); await containerNetwork.ConnectContainer(mainContainer.Id, task.Container.Name, timeout); return(await mainContainer.RunContainerWaitForExit(timeout)); }
protected override async Task <string> runCore(Docker.DotNet.DockerClient docker, CancellationToken timeout, string solutionFolderToMount) { await using var container = await ContainerCreationHelper.CreateNewContainer(task.Container, docker, logger, timeout, cp => configureMount(cp, solutionFolderToMount)); return(await container.RunContainerWaitForExit(timeout)); }