forked from OT-CONTAINER-KIT/redis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.exporter
30 lines (19 loc) · 1008 Bytes
/
Dockerfile.exporter
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM alpine:3.15 as builder
ARG TARGETARCH
ARG EXPORTER_URL="https://github.com/oliver006/redis_exporter/releases/download"
ARG REDIS_EXPORTER_VERSION="1.48.0"
RUN apk add --no-cache curl ca-certificates && \
curl -fL -Lo /tmp/redis_exporter-v${REDIS_EXPORTER_VERSION}.linux-$TARGETARCH.tar.gz \
${EXPORTER_URL}/v${REDIS_EXPORTER_VERSION}/redis_exporter-v${REDIS_EXPORTER_VERSION}.linux-$TARGETARCH.tar.gz && \
cd /tmp && tar -xvzf redis_exporter-v${REDIS_EXPORTER_VERSION}.linux-$TARGETARCH.tar.gz && \
mv redis_exporter-v${REDIS_EXPORTER_VERSION}.linux-$TARGETARCH redis_exporter
FROM scratch
ARG TARGETARCH
MAINTAINER Opstree Solutions
LABEL VERSION=1.0 \
ARCH=$TARGETARCH \
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
EXPOSE 9121
ENTRYPOINT ["/usr/local/bin/redis_exporter"]