public async Task <bool> InstantiateGrafanaContainer(PrometheusProvider prometheus, CancellationToken cancellationToken)
        {
            logger.Information("---- Starting Deploy Grafana Container ----");
            await DownloadImage("grafana/grafana", "latest", cancellationToken);


            var ports = new Dictionary <string, EmptyStruct>();

            ports.Add("3000/tcp", new EmptyStruct());

            var createParameters = new CreateContainerParameters()
            {
                Image        = "grafana/grafana:latest",
                Name         = GrafanaContainerName,
                Hostname     = GrafanaContainerName,
                ExposedPorts = ports,
                Env          = new List <string>()
                {
                    "GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-simple-json-datasource,grafana-piechart-panel"
                },
                HostConfig = new HostConfig()
                {
                    NetworkMode = NetworkName,
                    Binds       = new List <string>()
                    {
                        $"{prometheus.Path}:/etc/prometheus/prometheus.yml"
                    },
                    RestartPolicy = new RestartPolicy()
                    {
                        Name = RestartPolicyKind.Always
                    },
                    PortBindings = new Dictionary <string, IList <PortBinding> >
                    {
                        {
                            "3000/tcp",
                            new List <PortBinding>
                            {
                                new PortBinding
                                {
                                    HostPort = "3000"
                                }
                            }
                        }
                    }
                }
            };

            return(await DeployAndStartAsync(GrafanaContainerName, createParameters, cancellationToken));
        }
        public async Task <bool> InstantiatePrometheusContainer(PrometheusProvider prometheus, CancellationToken cancellationToken)
        {
            logger.Information("---- Starting Deploy Prometheus Container ----");
            await DownloadImage("prom/prometheus", "latest", cancellationToken);


            var ports = new Dictionary <string, EmptyStruct>();

            ports.Add("9090/tcp", new EmptyStruct());

            var createParameters = new CreateContainerParameters()
            {
                Image        = "prom/prometheus:latest",
                Name         = PrometheusContainerName,
                Hostname     = PrometheusContainerName,
                ExposedPorts = ports,
                HostConfig   = new HostConfig()
                {
                    NetworkMode = NetworkName,
                    Binds       = new List <string>()
                    {
                        $"{prometheus.Path}:/etc/prometheus/prometheus.yml"
                    },
                    RestartPolicy = new RestartPolicy()
                    {
                        Name = RestartPolicyKind.Always
                    },
                    PortBindings = new Dictionary <string, IList <PortBinding> >
                    {
                        {
                            "9090/tcp",
                            new List <PortBinding>
                            {
                                new PortBinding
                                {
                                    HostPort = "9090"
                                }
                            }
                        }
                    }
                }
            };

            return(await DeployAndStartAsync(PrometheusContainerName, createParameters, cancellationToken));
        }
        public async Task <bool> InstantiatePrometheusContainer(PrometheusProvider prometheus, CancellationToken cancellationToken)
        {
            Console.WriteLine("---- Starting Deploy Prometheus Container ----");
            await DownloadImage("prom/prometheus", "latest", cancellationToken);


            var ports = new Dictionary <string, EmptyStruct>();

            ports.Add("9090:9090", new EmptyStruct());

            var volumes = new Dictionary <string, EmptyStruct>();

            volumes.Add($"{prometheus.Path}:/etc/prometheus/prometheus.yml", new EmptyStruct());

            var createParameters = new CreateContainerParameters()
            {
                Image        = "prom/prometheus:latest",
                Name         = PrometheusContainerName,
                ExposedPorts = ports,
                Volumes      = volumes
            };

            return(await DeployAndStartAsync(PrometheusContainerName, createParameters, cancellationToken));
        }