await _client.Images.CreateImageAsync(
new ImagesCreateParameters
{
FromImage =$"{imageRegistryHost}/{imageRegistryProject}/{image.MicroserviceName}",
Tag = imagetag,
},
new AuthConfig
{
ServerAddress = "registry.mtywcloud.com",
Username = "dev",
Password = "2022"
},
new Progress());
private string DockerApiUri()
{
var isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
if (isWindows) return "npipe://./pipe/docker_engine";
var isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
if (isLinux) return "unix:/var/run/docker.sock";
throw new Exception(
"Was unable to determine what OS this is running on, does not appear to be Windows or Linux!?");
}
Output of
dotnet --info
:What version of Docker.DotNet?: 3.125.15
Steps to reproduce the issue:
What actually happened?:
_client =new DockerClientConfiguration(new Uri(DockerApiUri())) .CreateClient();
await _client.Images.CreateImageAsync( new ImagesCreateParameters { FromImage =$"{imageRegistryHost}/{imageRegistryProject}/{image.MicroserviceName}", Tag = imagetag, }, new AuthConfig { ServerAddress = "registry.mtywcloud.com", Username = "dev", Password = "2022" }, new Progress());
private string DockerApiUri() { var isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
What did you expect to happen?:
Additional information: