Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish x-Prometheus Docker images #6

Open
sandersaares opened this issue Dec 4, 2018 · 3 comments
Open

Publish x-Prometheus Docker images #6

sandersaares opened this issue Dec 4, 2018 · 3 comments

Comments

@sandersaares
Copy link

My workflow uses Prometheus as Docker images. It seems to me that the fork does not currently have published images. I request them to be published (or readme updated to point to existing ones that exist).

@sylr
Copy link

sylr commented May 10, 2019

I have generated one for myself:

quay.io/sylr/prometheus:v2.9.2_sylr.2 based on https://github.com/sylr/prometheus/releases/tag/v2.9.2%2Bsylr.2

Use it at your own risks ;)

@bmerry
Copy link

bmerry commented Dec 2, 2019

I would also love to have published Docker images. It seems that upstream Prometheus makes this more difficult than it should be though, because the Dockerfile doesn't actually build Prometheus: it just constructs a image from a build done on the host (and hence won't work out of the box with the automated builders provided by quay.io or Docker hub).

I've put the following Dockerfile together which builds an xrate image by starting from the upstream Docker image and injecting the published xrate prometheus binary (it doesn't bother with promtool - I don't know if xrate affects it). Use at your own risk:

# For some reason ARGs need to be repeated multiple times (maybe
# global and image scope?)
ARG VERSION=2.12.0

FROM alpine:3.10 as build
WORKDIR /
RUN apk add tar wget
ARG VERSION=2.12.0
ARG OS=linux
ARG ARCH=amd64
RUN wget --dot=mega https://github.com/free/prometheus/releases/download/${VERSION}-xrate/prometheus-${VERSION}.${OS}-${ARCH}.tar.gz
RUN tar -zxf prometheus-${VERSION}.${OS}-${ARCH}.tar.gz

FROM prom/prometheus:v${VERSION}
ARG VERSION=2.12.0
ARG OS=linux
ARG ARCH=amd64
COPY --from=build /prometheus-${VERSION}.${OS}-${ARCH}/prometheus /bin/prometheus

@bmerry
Copy link

bmerry commented Dec 3, 2019

I've published this as quay.io/ska-sa/xrate (and updated it to also copy the xrate version of promtool, in case that matters).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants