public static void Initialize(TestContext ctx) { if (CommandExtensions.IsNative() || CommandExtensions.IsEmulatedNative()) { _docker.LinuxMode(); return; } var machineName = "test-machine"; var machines = Machine.Ls(); if (machines.Success && machines.Data.Any(x => x.Name == "default")) { machineName = "default"; } else { machineName.Create(1024, 20000, 1); _createdTestMachine = true; } machineName.Start(); var inspect = machineName.Inspect().Data; _docker = machineName.Uri(); _certificates = new CertificatePaths { CaCertificate = inspect.AuthConfig.CaCertPath, ClientCertificate = inspect.AuthConfig.ClientCertPath, ClientKey = inspect.AuthConfig.ClientKeyPath }; _docker.LinuxMode(_certificates); }