From 7f5925d027881c08ce84a66f3c2721e344e9607a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Sat, 27 Apr 2024 15:45:21 +0200 Subject: [PATCH] Update to latest debian & prometheus python library --- Dockerfile | 15 ++++----------- restic-monitor.py | 1 + 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index 60e1e5f..dd5e431 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,24 +1,17 @@ -FROM debian:buster +FROM debian:bookworm RUN : \ && apt-get update \ && apt-get install -y \ + backblaze-b2 \ curl \ + dumb-init \ python3 \ python3-prometheus-client \ python3-yaml \ restic \ && apt-get -y clean -RUN : \ - && curl -s -L -o /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64 \ - && chmod +x /usr/local/bin/dumb-init - -RUN : \ - && curl -s -L https://github.com/restic/restic/releases/download/v0.9.6/restic_0.9.6_linux_amd64.bz2 \ - | bzip2 > /usr/local/bin/restic \ - && chmod +x /usr/local/bin/restic - COPY ./restic-monitor.py /usr/local/bin/restic-monitor -CMD ["/usr/local/bin/dumb-init", "--", "/usr/local/bin/restic-monitor", "/etc/restic-backblaze-config.yml"] +CMD ["/usr/bin/dumb-init", "--", "/usr/local/bin/restic-monitor", "/etc/restic-backblaze-config.yml"] diff --git a/restic-monitor.py b/restic-monitor.py index 1dfcef2..68cefb1 100755 --- a/restic-monitor.py +++ b/restic-monitor.py @@ -8,6 +8,7 @@ import subprocess import time import prometheus_client +import prometheus_client.core import yaml with open(sys.argv[1], 'r') as fd: