Use nix file to describe / build container

This commit is contained in:
Hendrik Sokolowski 2022-06-05 02:43:21 +02:00
parent 23bf1e54c7
commit 8e71f6c227
3 changed files with 11 additions and 11 deletions

View file

@ -1,4 +0,0 @@
FROM prom/prometheus
LABEL maintainer="pub.solar <crew@pub.solar>"
COPY src /

View file

@ -1,7 +0,0 @@
IMAGE=registry.greenbaum.cloud/pub_solar/prometheus
build:
docker build -t $(IMAGE) .
push:
docker push $(IMAGE)

View file

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