标签: fluent-docker

C# + DockerCompose - 在尝试连接之前等待 MS SQL Server Docker 容器启动

我正在尝试为我的微服务创建类似于Spotify 方法的集成测试。

I am still working on how to spin up and seed the database. Currently I have a .NET Core 2.0 project with FluentDocker v2.2.15 and DbUp 4.1.0.

I use FluentDocker to call DockerCompose and start my services, including the SQL Server container

var hosts = new Hosts().Discover();
var dockerHost = hosts.FirstOrDefault(x => x.IsNative) ?? hosts.FirstOrDefault(x => x.Name == "default");

if (dockerHost == null)
{
    return;
}

var composeFile = Args["composeFile"];

var result = dockerHost.Host.ComposeUp(composeFile: composeFile);
Run Code Online (Sandbox Code Playgroud)

and …

c# sql-server docker-compose dbup fluent-docker

5
推荐指数
1
解决办法
3216
查看次数

标签 统计

c# ×1

dbup ×1

docker-compose ×1

fluent-docker ×1

sql-server ×1