从.NET

时间:2019-07-28 18:25:03

标签: docker .net-core

我正在dotnet中进行集成测试。我的想法是要与数据库一起测试我的API。我想将数据库托管在docker容器中,每当我需要一个新实例时,我只需删除旧容器并创建一个新容器即可。 我正在使用Docker工具箱。当前,当尝试列出计算机上的可用容器时,出现一般错误System.IO.IOException: Unexpected end of stream

尝试连接到docker,看起来可以正常工作:

_client = new DockerClientConfiguration(new Uri("tcp://192.168.99.100:2376")).CreateClient();

尝试列出容器时出现错误:

IList<ContainerListResponse> containers = await _client.Containers.ListContainersAsync(new ContainersListParameters() { Limit = 10, });

有什么问题吗?

0 个答案:

没有答案