public CommandResponse <IList <String> > CreateNetwork(string Name) { var n = new NetworkCreateParams(); var response = _docker.Host.NetworkCreate(Name, null); return(response); }
public static CommandResponse <IList <string> > NetworkCreate(this DockerUri host, string network, NetworkCreateParams prms = null, ICertificatePaths certificates = null) { var args = $"{host.RenderBaseArgs(certificates)}"; return (new ProcessExecutor <StringListResponseParser, IList <string> >( "docker".ResolveBinary(), $"{args} network create {prms} {network}").Execute()); }
public INetworkService CreateNetwork(string name, NetworkCreateParams createParams = null, bool removeOnDispose = false) { var result = Host.NetworkCreate(name, createParams, Certificates); if (!result.Success) { throw new FluentDockerException($"Failed to create network named {name}"); } return(new DockerNetworkService(name, result.Data[0], Host, Certificates, removeOnDispose)); }