From bf69b7a6a10af49c00f371932aa7fad7bb6aeea1 Mon Sep 17 00:00:00 2001 From: iamabhishek-dubey Date: Sat, 21 Mar 2020 22:52:08 +0530 Subject: [PATCH] Added Dockerfile for redis exporter --- Dockerfile.exporter | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Dockerfile.exporter diff --git a/Dockerfile.exporter b/Dockerfile.exporter new file mode 100644 index 0000000..bde7b78 --- /dev/null +++ b/Dockerfile.exporter @@ -0,0 +1,28 @@ +FROM alpine:3.9 as builder + +ARG EXPORTER_URL="https://github.com/oliver006/redis_exporter/releases/download" + +ARG REDIS_EXPORTER_VERSION="1.5.2" + +RUN apk add --no-cache curl ca-certificates && \ + curl -fL -Lo /tmp/redis_exporter-v${REDIS_EXPORTER_VERSION}.linux-amd64.tar.gz \ + ${EXPORTER_URL}/${REDIS_EXPORTER_VERSION}/redis_exporter-v${REDIS_EXPORTER_VERSION}.linux-amd64.tar.gz && \ + cd /tmp && tar -xvzf redis_exporter-v${REDIS_EXPORTER_VERSION}.linux-amd64.tar.gz && \ + mv redis_exporter-v${REDIS_EXPORTER_VERSION}.linux-amd64 redis_exporter + +FROM scratch:latest + +MAINTAINER Opstree Solutions + +LABEL VERSION=1.0 \ + ARCH=AMD64 \ + DESCRIPTION="A production grade redis exporter docker image created by Opstree Solutions" + +COPY --from=builder /etc/ssl/certs /etc/ssl/certs +COPY --from=builder /tmp/redis_exporter/redis_exporter /usr/local/bin/redis_exporter + +USER non-root + +EXPOSE 9121 + +ENTRYPOINT ["/usr/local/bin/redis_exporter"] -- 2.26.0