From 8e71f6c2273f969db4d14d22343c281bf298c4ba Mon Sep 17 00:00:00 2001 From: Hendrik Sokolowski Date: Sun, 5 Jun 2022 02:43:21 +0200 Subject: [PATCH] Use nix file to describe / build container --- monitoring/prometheus/Dockerfile | 4 ---- monitoring/prometheus/Makefile | 7 ------- monitoring/prometheus/default.nix | 11 +++++++++++ 3 files changed, 11 insertions(+), 11 deletions(-) delete mode 100644 monitoring/prometheus/Dockerfile delete mode 100644 monitoring/prometheus/Makefile create mode 100644 monitoring/prometheus/default.nix diff --git a/monitoring/prometheus/Dockerfile b/monitoring/prometheus/Dockerfile deleted file mode 100644 index 8133042..0000000 --- a/monitoring/prometheus/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM prom/prometheus -LABEL maintainer="pub.solar " - -COPY src / diff --git a/monitoring/prometheus/Makefile b/monitoring/prometheus/Makefile deleted file mode 100644 index b591555..0000000 --- a/monitoring/prometheus/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -IMAGE=registry.greenbaum.cloud/pub_solar/prometheus - -build: - docker build -t $(IMAGE) . - -push: - docker push $(IMAGE) diff --git a/monitoring/prometheus/default.nix b/monitoring/prometheus/default.nix new file mode 100644 index 0000000..f838e78 --- /dev/null +++ b/monitoring/prometheus/default.nix @@ -0,0 +1,11 @@ +{ pkgs ? import {} }: +{ + prometheus = pkgs.dockerTools.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" ]; + }; + }; +}