diff --git a/Dockerfile b/Dockerfile index afe88aa..44e2f74 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,22 +4,21 @@ LABEL maintainer="Opstree Solutions" ARG TARGETARCH -LABEL VERSION=1.0 \ - ARCH=$TARGETARCH \ - DESCRIPTION="A production grade performance tuned redis docker image created by Opstree Solutions" +LABEL version=1.0 \ + arch=$TARGETARCH \ + description="A production grade performance tuned redis docker image created by Opstree Solutions" ARG REDIS_DOWNLOAD_URL="http://download.redis.io/" ARG REDIS_VERSION="stable" -RUN apk add --no-cache su-exec tzdata make curl build-base linux-headers bash openssl-dev +RUN apk add --no-cache su-exec=0.2-r3 tzdata=2023c-r1 make=4.4.1-r2 curl=8.3.0-r1 build-base=0.5-r3 \ + linux-headers=6.5-r0 bash=5.2.15-r5 openssl-dev=3.1.3-r0 -RUN curl -fL -Lo /tmp/redis-${REDIS_VERSION}.tar.gz ${REDIS_DOWNLOAD_URL}/redis-${REDIS_VERSION}.tar.gz && \ - cd /tmp && \ +RUN curl -fL -Lo redis-${REDIS_VERSION}.tar.gz ${REDIS_DOWNLOAD_URL}/redis-${REDIS_VERSION}.tar.gz && \ tar xvzf redis-${REDIS_VERSION}.tar.gz && \ - cd redis-${REDIS_VERSION} && \ - make && \ - make install BUILD_TLS=yes + make -C redis-${REDIS_VERSION} && \ + make -C redis-${REDIS_VERSION} install BUILD_TLS=yes FROM alpine:3.15 @@ -35,7 +34,7 @@ COPY --from=builder /usr/local/bin/redis-server /usr/local/bin/redis-server COPY --from=builder /usr/local/bin/redis-cli /usr/local/bin/redis-cli RUN addgroup -S -g 1000 redis && adduser -S -G redis -u 1000 redis && \ - apk add --no-cache bash + apk add --no-cache bash=5.2.15-r5 COPY redis.conf /etc/redis/redis.conf diff --git a/Dockerfile.exporter b/Dockerfile.exporter index 2dcaa89..d78cc6a 100644 --- a/Dockerfile.exporter +++ b/Dockerfile.exporter @@ -6,11 +6,12 @@ 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 +RUN apk add --no-cache curl=8.3.0-r1 ca-certificates=20230506-r0 && \ + curl -fL -Lo redis_exporter.tar.gz \ + ${EXPORTER_URL}/v${REDIS_EXPORTER_VERSION}/redis_exporter-v${REDIS_EXPORTER_VERSION}.linux-$TARGETARCH.tar.gz && \ + tar -xvzf redis_exporter.tar.gz && \ + mv redis_exporter-v${REDIS_EXPORTER_VERSION}.linux-$TARGETARCH /redis_exporter + FROM scratch diff --git a/Dockerfile.sentinel b/Dockerfile.sentinel index 0b9c60c..872aba5 100644 --- a/Dockerfile.sentinel +++ b/Dockerfile.sentinel @@ -10,14 +10,13 @@ ARG REDIS_DOWNLOAD_URL="http://download.redis.io/" ARG REDIS_SENTINEL_VERSION="stable" -RUN apk add --no-cache su-exec tzdata make curl build-base linux-headers bash openssl-dev +RUN apk add --no-cache su-exec=0.2-r3 tzdata=2023c-r1 make=4.4.1-r2 curl=8.3.0-r1 build-base=0.5-r3 \ + linux-headers=6.5-r0 bash=5.2.15-r5 openssl-dev=3.1.3-r0 -RUN curl -fL -Lo /tmp/redis-${REDIS_SENTINEL_VERSION}.tar.gz ${REDIS_DOWNLOAD_URL}/redis-${REDIS_SENTINEL_VERSION}.tar.gz && \ - cd /tmp && \ +RUN curl -fL -Lo redis-${REDIS_SENTINEL_VERSION}.tar.gz ${REDIS_DOWNLOAD_URL}/redis-${REDIS_SENTINEL_VERSION}.tar.gz && \ tar xvzf redis-${REDIS_SENTINEL_VERSION}.tar.gz && \ - cd redis-${REDIS_SENTINEL_VERSION} && \ - make && \ - make install BUILD_TLS=yes + make -C redis-${REDIS_SENTINEL_VERSION} && \ + make -C redis-${REDIS_SENTINEL_VERSION} install BUILD_TLS=yes FROM alpine:3.15 @@ -32,7 +31,7 @@ COPY --from=builder /usr/local/bin/redis-cli /usr/local/bin/redis-cli COPY --from=builder /usr/local/bin/redis-sentinel /usr/local/bin/redis-sentinel RUN addgroup -S -g 1000 redis && adduser -S -G redis -u 1000 redis && \ - apk add --no-cache bash + apk add --no-cache bash=5.2.15-r5 COPY sentinel.conf /etc/redis/sentinel.conf