From 7bffbf537fb658011292c462476fc73ef94e362a Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 3 Jul 2022 16:59:56 +0200 Subject: [PATCH] Use prom/prometheus docker image from DockerHub nixpkgs prometheus version lags behind two minor versions at the moment --- monitoring/prometheus/default.nix | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/monitoring/prometheus/default.nix b/monitoring/prometheus/default.nix index f838e78..bf2cd18 100644 --- a/monitoring/prometheus/default.nix +++ b/monitoring/prometheus/default.nix @@ -1,11 +1,19 @@ { pkgs ? import {} }: +with pkgs.dockerTools; +let + prometheusFromDockerHub = pullImage { + imageName = "prom/prometheus"; + imageDigest = "sha256:f2fa04806b65f49b652c8d418544bb9660bb8224619ee8c960a778f46614dddf"; + sha256 = "sha256-nag9EOyEDN6zh7AW7W7QJQDPV5C58J5yesfF24/6/3k="; + finalImageTag = "v2.36.2"; + finalImageName = "prometheus"; + }; +in { - prometheus = pkgs.dockerTools.buildImage { + prometheus = buildImage { name = "registry.greenbaum.cloud/pub_solar/prometheus"; - tag = "v2.36.0"; - contents = [ pkgs.prometheus ./src ]; - config = { - Cmd = [ "/bin/prometheus" "--config.file=/etc/prometheus/prometheus.yml" ]; - }; + tag = "v2.36.2"; + fromImage = prometheusFromDockerHub; + contents = [ ./src ]; }; }