docker-compose --project-directory ./docker -f docker-compose.yml -f docker-compose.prod.yml up
got the following exception
Unhandled exception. Ductus.FluentDocker.Common.FluentDockerException: Could not dispose composite service from file(s) docker-compose.yml, docker-compose.prod.yml
attempt with fluent docker
using Ductus.FluentDocker.Services;
using Ductus.FluentDocker.Services.Impl;
using Ductus.FluentDocker.Model.Compose;
var hosts = new Hosts().Discover();
var _docker = hosts.FirstOrDefault(host => host.IsNative) ?? hosts.FirstOrDefault(host => host.Name == "default");
var composeConfig = new DockerComposeConfig
{
ProjectDirectory = Path.Combine(Directory.GetCurrentDirectory(), "docker"),
ComposeFilePath = new List<string> { "docker-compose.yml", "docker-compose.prod.yml" },
ForceRecreate = true,
RemoveOrphans = true,
StopOnDispose = true,
};
using (var serviceManager = new DockerComposeCompositeService(_docker, composeConfig))
{
foreach (var container in serviceManager.Containers)
{
Console.WriteLine(container.Name);
}
}
here is what i am trying to accomplish
got the following exception
attempt with fluent docker