Skip to content

Commit

Permalink
Update cd.yaml
Browse files Browse the repository at this point in the history
Signed-off-by: drivebyer <[email protected]>
  • Loading branch information
drivebyer committed Sep 13, 2024
1 parent 27778e8 commit 7b5256f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 24 deletions.
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ RUN apk add --no-cache su-exec tzdata make curl build-base linux-headers bash op

WORKDIR /tmp

RUN REDIS_VERSION=$(echo ${REDIS_VERSION} | sed 's/^v//'); \
case "${REDIS_VERSION}" in \
latest | stable) REDIS_DOWNLOAD_URL="http://download.redis.io/redis-stable.tar.gz";; \
*) REDIS_DOWNLOAD_URL="http://download.redis.io/releases/redis-${REDIS_VERSION}.tar.gz";; \
RUN VERSION=$(echo ${REDIS_VERSION} | sed -e "s/^v//g"); \
case "${VERSION}" in \
latest | stable) REDIS_DOWNLOAD_URL="http://download.redis.io/redis-stable.tar.gz" && VERSION="stable";; \
*) REDIS_DOWNLOAD_URL="http://download.redis.io/releases/redis-${VERSION}.tar.gz";; \
esac; \
curl -fL -Lo redis-${REDIS_VERSION}.tar.gz ${REDIS_DOWNLOAD_URL}; \
tar xvzf redis-${REDIS_VERSION}.tar.gz
curl -fL -Lo redis-${VERSION}.tar.gz ${REDIS_DOWNLOAD_URL}; \
tar xvzf redis-${VERSION}.tar.gz

WORKDIR /tmp/redis-${REDIS_VERSION}
WORKDIR /tmp/redis-${VERSION}

RUN arch="$(uname -m)"; \
extraJemallocConfigureFlags="--with-lg-page=16"; \
if [ "$arch" = "aarch64" ] || [ "$arch" = "arm64" ]; then \
sed -ri 's!cd jemalloc && ./configure !&'"$extraJemallocConfigureFlags"' !' /tmp/redis-${REDIS_VERSION}/deps/Makefile; \
sed -ri 's!cd jemalloc && ./configure !&'"$extraJemallocConfigureFlags"' !' /tmp/redis-${VERSION}/deps/Makefile; \
fi; \
export BUILD_TLS=yes; \
make all; \
Expand Down
13 changes: 6 additions & 7 deletions Dockerfile.exporter
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ ARG TARGETARCH

ARG EXPORTER_URL="https://github.com/oliver006/redis_exporter/releases/download"

ARG REDIS_EXPORTER_VERSION="1.48.0"
ARG REDIS_EXPORTER_VERSION="v1.48.0"

WORKDIR /tmp

RUN REDIS_EXPORTER_VERSION=$(echo ${REDIS_EXPORTER_VERSION} | sed 's/^v//'); \
apk add --no-cache curl ca-certificates; \
curl -fL -Lo 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; \
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 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

Expand Down
18 changes: 9 additions & 9 deletions Dockerfile.sentinel
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ RUN apk add --no-cache su-exec tzdata make curl build-base linux-headers bash op

WORKDIR /tmp

RUN REDIS_SENTINEL_VERSION=$(echo ${REDIS_SENTINEL_VERSION} | sed 's/^v//'); \
case "${REDIS_SENTINEL_VERSION}" in \
latest | stable) REDIS_DOWNLOAD_URL="http://download.redis.io/redis-stable.tar.gz";; \
*) REDIS_DOWNLOAD_URL="http://download.redis.io/releases/redis-${REDIS_SENTINEL_VERSION}.tar.gz";; \
RUN VERSION=$(echo ${REDIS_SENTINEL_VERSION} | sed -e "s/^v//g"); \
case "${VERSION}" in \
latest | stable) REDIS_DOWNLOAD_URL="http://download.redis.io/redis-stable.tar.gz" && VERSION="stable";; \
*) REDIS_DOWNLOAD_URL="http://download.redis.io/releases/redis-${VERSION}.tar.gz";; \
esac; \
\
curl -fL -Lo redis-${REDIS_SENTINEL_VERSION}.tar.gz ${REDIS_DOWNLOAD_URL}; \
tar xvzf redis-${REDIS_SENTINEL_VERSION}.tar.gz
curl -fL -Lo redis-${VERSION}.tar.gz ${REDIS_DOWNLOAD_URL}; \
tar xvzf redis-${VERSION}.tar.gz

WORKDIR /tmp

RUN arch="$(uname -m)"; \
extraJemallocConfigureFlags="--with-lg-page=16"; \
if [ "$arch" = "aarch64" ] || [ "$arch" = "arm64" ]; then \
sed -ri 's!cd jemalloc && ./configure !&'"$extraJemallocConfigureFlags"' !' /tmp/redis-${REDIS_SENTINEL_VERSION}/deps/Makefile; \
sed -ri 's!cd jemalloc && ./configure !&'"$extraJemallocConfigureFlags"' !' /tmp/redis-${VERSION}/deps/Makefile; \
fi; \
export BUILD_TLS=yes; \
make -C redis-${REDIS_SENTINEL_VERSION} all; \
make -C redis-${REDIS_SENTINEL_VERSION} install
make -C redis-${VERSION} all; \
make -C redis-${VERSION} install

FROM alpine:3.15

Expand Down

0 comments on commit 7b5256f

Please sign in to comment.