-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathDockerfile.exporter
32 lines (20 loc) · 995 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
31
32
FROM alpine:3.19 as builder
ARG TARGETARCH
ARG EXPORTER_URL="https://github.com/oliver006/redis_exporter/releases/download"
ARG REDIS_EXPORTER_VERSION="v1.48.0"
WORKDIR /tmp
RUN apk add --no-cache curl ca-certificates; \
curl -fL -Lo redis_exporter-${REDIS_EXPORTER_VERSION}.linux-$TARGETARCH.tar.gz \
${EXPORTER_URL}/${REDIS_EXPORTER_VERSION}/redis_exporter-${REDIS_EXPORTER_VERSION}.linux-$TARGETARCH.tar.gz; \
tar -xvzf redis_exporter-${REDIS_EXPORTER_VERSION}.linux-$TARGETARCH.tar.gz; \
mv redis_exporter-${REDIS_EXPORTER_VERSION}.linux-$TARGETARCH redis_exporter
FROM scratch
ARG TARGETARCH
LABEL maintainer="Opstree Solutions"
LABEL vesrion=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"]