Use prom/prometheus docker image from DockerHub

nixpkgs prometheus version lags behind two minor versions at the moment
This commit is contained in:
teutat3s 2022-07-03 16:59:56 +02:00
parent f477f7fd31
commit 7bffbf537f
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1

View file

@ -1,11 +1,19 @@
{ pkgs ? import <nixpkgs> {} }:
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 ];
};
}