Docker.DotNet hangs when attempting to pull an image to a remote host after extracting image completes
- Dominant language
- C#
- Stars
- 2.4k
- Forks
- 416
- PR merge metrics
- No merged PRs in 30d
Description
**What version of Docker.DotNet?:**
3.125.1
**Steps to reproduce the issue:**
1. Connect to a docker daemon running on a remote host.
2. Attempt to pull an image to that host using CreateImageAsync.
3. Docker.DotNet hangs after extracting image completes and never returns.
4. Image is not successfully pulled.
**Additional information:**
Remote host Windows 2016 server running docker version 17.06.2-ee-6.
NOTE. If you attempt to pull the image to docker running on the local machine it works correctly. (i.e. connect to http://localhost:2375)
The following code should be enough for you to reproduce the issue.
```c#
static async Task Main( string[] args )
{
var IPOfRemoteHost = "PUT YOUR REMOTE HOST IP HERE";
var PortOfRemoteHost = 2375;
var image = "microsoft/dotnet-framework:4.7";
using( var remoteClient = new DockerClientConfiguration( new Uri( $"http://{IPOfRemoteHost}:{PortOfRemoteHost}" ) ).CreateClient() )
{
var systemInfo = await remoteClient.System.GetSystemInfoAsync();
Console.WriteLine( $"Connected to Docker Daemon @ {remoteClient.Configuration.EndpointBaseUri}" );
Console.WriteLine( $"Daemon Version : {systemInfo.ServerVersion}{Environment.NewLine}" );
Console.WriteLine( $"Attempting to pull image {image} to {remoteClient.Configuration.EndpointBaseUri}{Environment.NewLine}" );
try
{
// create progress
var report = new Progress( msg =>
{
Console.WriteLine( $"{msg.Status}|{msg.ProgressMessage}|{msg.ErrorMessage}" );
} );
// pull image again
await remoteClient.Images.CreateImageAsync( new ImagesCreateParameters
{
FromImage = image
},
new AuthConfig(),
report
);
Console.WriteLine( $"{Environment.NewLine}Successfully pulled image {image} to {remoteClient.Configuration.EndpointBaseUri}" );
}
catch( Exception ex )
{
Console.WriteLine( $"Exception thrown attempting to pull image {image} to {remoteClient.Configuration.EndpointBaseUri}" );
Console.WriteLine( $"{ex}" );
}
}
Console.WriteLine( "Press ENTER to exit..." );
Console.ReadLine();
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.