You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I run IContainerService.GetNetworks(); or IContainerService.GetVolumes(); before I start the container then IContainerService.State never becomes ServiceRunningState.Running;
The container itself does enter the running state.
Example code:
var container =
new Ductus.FluentDocker.Builders.Builder().UseContainer()
.UseImage("alpine")
.MountVolume("test", "/dev/test", Ductus.FluentDocker.Model.Builders.MountType.ReadWrite)
.Command("tail", "-f", "/dev/null")
.KeepContainer()
.ExposePort(5432)
.WaitForPort("5432/tcp", 30000 /*30s*/)
.KeepRunning()
.Build();
container.GetNetworks(); //If I remove this line it works again
container.Start();
var test = container.State == ServiceRunningState.Running; //false
Console.ReadKey();
This workaround fixes the issue:
var container =
new Ductus.FluentDocker.Builders.Builder().UseContainer()
.UseImage("alpine")
.MountVolume("test", "/dev/test", Ductus.FluentDocker.Model.Builders.MountType.ReadWrite)
.Command("tail", "-f", "/dev/null")
.KeepContainer()
.ExposePort(5432)
.WaitForPort("5432/tcp", 30000 /*30s*/)
.KeepRunning()
.Build();
container.Start();
container.GetNetworks();
container.GetConfiguration(true); //If I add this line works
var test = container.State == ServiceRunningState.Running; //true
Console.ReadKey();
So I guess the issue is in DockerContainerService.cs:160
if (GetConfiguration().State.Running)
State = ServiceRunningState.Running;
The text was updated successfully, but these errors were encountered:
If I run
IContainerService.GetNetworks();
orIContainerService.GetVolumes();
before I start the container thenIContainerService.State
never becomesServiceRunningState.Running;
The container itself does enter the running state.
Example code:
This workaround fixes the issue:
So I guess the issue is in DockerContainerService.cs:160
The text was updated successfully, but these errors were encountered: