From dee6560439f786091e500c4a7f0e9c60fb5d2480 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Wed, 30 Jan 2019 14:01:53 +0200 Subject: [PATCH] Add Prometheus 2.7.0 for ARMHF/ARM64 Signed-off-by: Radoslav Dimitrov --- contrib/prometheus-arm64/2.7.0/Dockerfile | 31 +++++++++++++++++++++++ contrib/prometheus-arm64/2.7.0/Makefile | 10 ++++++++ contrib/prometheus-arm64/2.7.0/README.md | 13 ++++++++++ contrib/prometheus-armhf/2.7.0/Dockerfile | 31 +++++++++++++++++++++++ contrib/prometheus-armhf/2.7.0/Makefile | 10 ++++++++ contrib/prometheus-armhf/2.7.0/README.md | 13 ++++++++++ 6 files changed, 108 insertions(+) create mode 100644 contrib/prometheus-arm64/2.7.0/Dockerfile create mode 100644 contrib/prometheus-arm64/2.7.0/Makefile create mode 100644 contrib/prometheus-arm64/2.7.0/README.md create mode 100644 contrib/prometheus-armhf/2.7.0/Dockerfile create mode 100644 contrib/prometheus-armhf/2.7.0/Makefile create mode 100644 contrib/prometheus-armhf/2.7.0/README.md diff --git a/contrib/prometheus-arm64/2.7.0/Dockerfile b/contrib/prometheus-arm64/2.7.0/Dockerfile new file mode 100644 index 000000000..a020f5b82 --- /dev/null +++ b/contrib/prometheus-arm64/2.7.0/Dockerfile @@ -0,0 +1,31 @@ +FROM alpine:3.8 +WORKDIR /root/ + +RUN apk add --update libarchive-tools curl \ + && curl -sLf https://github.com/prometheus/prometheus/releases/download/v2.7.0/prometheus-2.7.0.linux-arm64.tar.gz > prometheus.tar.gz \ + && bsdtar -xvf prometheus.tar.gz -C ./ --strip-components=1 \ + && apk del libarchive-tools curl \ + && mkdir /etc/prometheus \ + && mkdir -p /usr/share/prometheus \ + && cp prometheus /bin/prometheus \ + && cp promtool /bin/promtool \ + && cp prometheus.yml /etc/prometheus/ \ + && cp -r console_libraries /usr/share/prometheus/ \ + && cp -r consoles /usr/share/prometheus/ \ + && rm -rf /root/* + +RUN ln -s /usr/share/prometheus/console_libraries /usr/share/prometheus/consoles/ /etc/prometheus/ +RUN mkdir -p /prometheus && \ + chown -R nobody:nogroup /etc/prometheus /prometheus + +USER nobody +EXPOSE 9090 +VOLUME [ "/prometheus" ] +WORKDIR /prometheus + +ENTRYPOINT [ "/bin/prometheus" ] +CMD [ "--config.file=/etc/prometheus/prometheus.yml", \ + "--storage.tsdb.path=/prometheus", \ + "--web.console.libraries=/usr/share/prometheus/console_libraries", \ + "--web.console.templates=/usr/share/prometheus/consoles" ] + diff --git a/contrib/prometheus-arm64/2.7.0/Makefile b/contrib/prometheus-arm64/2.7.0/Makefile new file mode 100644 index 000000000..798f2d1f0 --- /dev/null +++ b/contrib/prometheus-arm64/2.7.0/Makefile @@ -0,0 +1,10 @@ +.PHONY: all +all: ci-arm64-build ci-arm64-push + +.PHONY: ci-arm64-build +ci-arm64-build: + docker build -t functions/prometheus:2.7.0-arm64 . + +.PHONY: ci-arm64-push +ci-arm64-push: + docker push functions/prometheus:2.7.0-arm64 diff --git a/contrib/prometheus-arm64/2.7.0/README.md b/contrib/prometheus-arm64/2.7.0/README.md new file mode 100644 index 000000000..d0a4d6e7e --- /dev/null +++ b/contrib/prometheus-arm64/2.7.0/README.md @@ -0,0 +1,13 @@ +# Prometheus for ARM64 + +## Building: + +```bash +make ci-arm64-build +``` + +## Pushing: + +```bash +make ci-arm64-push +``` diff --git a/contrib/prometheus-armhf/2.7.0/Dockerfile b/contrib/prometheus-armhf/2.7.0/Dockerfile new file mode 100644 index 000000000..8bdd4e28c --- /dev/null +++ b/contrib/prometheus-armhf/2.7.0/Dockerfile @@ -0,0 +1,31 @@ +FROM alpine:3.8 +WORKDIR /root/ + +RUN apk add --update libarchive-tools curl \ + && curl -sLf https://github.com/prometheus/prometheus/releases/download/v2.7.0/prometheus-2.7.0.linux-armv7.tar.gz > prometheus.tar.gz \ + && bsdtar -xvf prometheus.tar.gz -C ./ --strip-components=1 \ + && apk del libarchive-tools curl \ + && mkdir /etc/prometheus \ + && mkdir -p /usr/share/prometheus \ + && cp prometheus /bin/prometheus \ + && cp promtool /bin/promtool \ + && cp prometheus.yml /etc/prometheus/ \ + && cp -r console_libraries /usr/share/prometheus/ \ + && cp -r consoles /usr/share/prometheus/ \ + && rm -rf /root/* + +RUN ln -s /usr/share/prometheus/console_libraries /usr/share/prometheus/consoles/ /etc/prometheus/ +RUN mkdir -p /prometheus && \ + chown -R nobody:nogroup /etc/prometheus /prometheus + +USER nobody +EXPOSE 9090 +VOLUME [ "/prometheus" ] +WORKDIR /prometheus + +ENTRYPOINT [ "/bin/prometheus" ] +CMD [ "--config.file=/etc/prometheus/prometheus.yml", \ + "--storage.tsdb.path=/prometheus", \ + "--web.console.libraries=/usr/share/prometheus/console_libraries", \ + "--web.console.templates=/usr/share/prometheus/consoles" ] + diff --git a/contrib/prometheus-armhf/2.7.0/Makefile b/contrib/prometheus-armhf/2.7.0/Makefile new file mode 100644 index 000000000..bb10612e3 --- /dev/null +++ b/contrib/prometheus-armhf/2.7.0/Makefile @@ -0,0 +1,10 @@ +.PHONY: all +all: ci-armhf-build ci-armhf-push + +.PHONY: ci-armhf-build +ci-armhf-build: + docker build -t functions/prometheus:2.7.0-armhf . + +.PHONY: ci-armhf-push +ci-armhf-push: + docker push functions/prometheus:2.7.0-armhf diff --git a/contrib/prometheus-armhf/2.7.0/README.md b/contrib/prometheus-armhf/2.7.0/README.md new file mode 100644 index 000000000..195d79212 --- /dev/null +++ b/contrib/prometheus-armhf/2.7.0/README.md @@ -0,0 +1,13 @@ +# Prometheus for ARMHF + +## Building: + +```bash +make ci-armhf-build +``` + +## Pushing: + +```bash +make ci-armhf-push +```