using Docker.DotNet; using MoonlightServers.Daemon.ServerSystem.Abstractions; namespace MoonlightServers.Daemon.ServerSystem.Implementations.Docker; public static class Extensions { public static void AddDockerServices(this IServiceCollection collection) { var client = new DockerClientBuilder() .WithEndpoint(new Uri("unix:///var/run/docker.sock")) .Build(); collection.AddSingleton(client); collection.AddSingleton(); collection.AddHostedService(sp => sp.GetRequiredService()); collection.AddSingleton(); collection.AddSingleton(); } }