From 1587186173edec31b474d713dbc6e16497aa4cab Mon Sep 17 00:00:00 2001 From: Roshan Khatri Date: Wed, 3 Apr 2024 05:55:25 +0000 Subject: [PATCH] Fix Docker files, template and Readme --- Dockerfile.template | 7 ++++--- README.md | 27 ++------------------------- unstable/alpine/Dockerfile | 10 ++++++---- unstable/debian/Dockerfile | 10 ++++++---- 4 files changed, 18 insertions(+), 36 deletions(-) diff --git a/Dockerfile.template b/Dockerfile.template index 85ea39f..92cf82c 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -154,11 +154,12 @@ RUN set -eux; \ {{ ) end -}} \ wget -O valkey.tar.gz "$VALKEY_DOWNLOAD_URL"; \ - {{ if "$VALKEY_VERSION" != "unstable" then ( -}} - echo "$VALKEY_DOWNLOAD_SHA *valkey.tar.gz" | sha256sum -c -; \ + {{ if .version == "unstable" then ( -}} + echo "Unstable Valkey version, do not compare SHA256SUM" ;\ {{ ) else ( -}} - echo "Unstable Valkey version" + echo "$VALKEY_DOWNLOAD_SHA *valkey.tar.gz" | sha256sum -c -; \ {{ ) end -}} + \ mkdir -p /usr/src/valkey; \ tar -xzf valkey.tar.gz -C /usr/src/valkey --strip-components=1; \ rm valkey.tar.gz; \ diff --git a/README.md b/README.md index b3dea94..ba65f3f 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,3 @@ -# https://github.com/docker-library/redis +This project is forked from https://github.com/docker-library/redis which is maintained by [the Docker Community](https://github.com/docker-library/redis) -## Maintained by: [the Docker Community](https://github.com/docker-library/redis) - -This is the Git repo of the [Docker "Official Image"](https://github.com/docker-library/official-images#what-are-official-images) for [`redis`](https://hub.docker.com/_/redis/) (not to be confused with any official `redis` image provided by `redis` upstream). See [the Docker Hub page](https://hub.docker.com/_/redis/) for the full readme on how to use this Docker image and for information regarding contributing and issues. - -The [full image description on Docker Hub](https://hub.docker.com/_/redis/) is generated/maintained over in [the docker-library/docs repository](https://github.com/docker-library/docs), specifically in [the `redis` directory](https://github.com/docker-library/docs/tree/master/redis). - -## See a change merged here that doesn't show up on Docker Hub yet? - -For more information about the full official images change lifecycle, see [the "An image's source changed in Git, now what?" FAQ entry](https://github.com/docker-library/faq#an-images-source-changed-in-git-now-what). - -For outstanding `redis` image PRs, check [PRs with the "library/redis" label on the official-images repository](https://github.com/docker-library/official-images/labels/library%2Fredis). For the current "source of truth" for [`redis`](https://hub.docker.com/_/redis/), see [the `library/redis` file in the official-images repository](https://github.com/docker-library/official-images/blob/master/library/redis). - ---- - -- [![build status badge](https://img.shields.io/github/actions/workflow/status/docker-library/redis/ci.yml?branch=master&label=GitHub%20CI)](https://github.com/docker-library/redis/actions?query=workflow%3A%22GitHub+CI%22+branch%3Amaster) -- [![build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/update.sh/job/redis.svg?label=Automated%20update.sh)](https://doi-janky.infosiftr.net/job/update.sh/job/redis/) - -| Build | Status | Badges | (per-arch) | -|:-:|:-:|:-:|:-:| -| [![amd64 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/amd64/job/redis.svg?label=amd64)](https://doi-janky.infosiftr.net/job/multiarch/job/amd64/job/redis/) | [![arm32v5 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v5/job/redis.svg?label=arm32v5)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v5/job/redis/) | [![arm32v6 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v6/job/redis.svg?label=arm32v6)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v6/job/redis/) | [![arm32v7 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/redis.svg?label=arm32v7)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/redis/) | -| [![arm64v8 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/redis.svg?label=arm64v8)](https://doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/redis/) | [![i386 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/i386/job/redis.svg?label=i386)](https://doi-janky.infosiftr.net/job/multiarch/job/i386/job/redis/) | [![mips64le build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/mips64le/job/redis.svg?label=mips64le)](https://doi-janky.infosiftr.net/job/multiarch/job/mips64le/job/redis/) | [![ppc64le build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/redis.svg?label=ppc64le)](https://doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/redis/) | -| [![s390x build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/s390x/job/redis.svg?label=s390x)](https://doi-janky.infosiftr.net/job/multiarch/job/s390x/job/redis/) | [![put-shared build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/put-shared/job/light/job/redis.svg?label=put-shared)](https://doi-janky.infosiftr.net/job/put-shared/job/light/job/redis/) | - - +This is the Git repo of the [Valkey "Unofficial Image"](https://hub.docker.com/r/roshkhatri/valkey/) diff --git a/unstable/alpine/Dockerfile b/unstable/alpine/Dockerfile index 922ac73..e733ba5 100644 --- a/unstable/alpine/Dockerfile +++ b/unstable/alpine/Dockerfile @@ -71,18 +71,20 @@ RUN set -eux; \ ; \ \ wget -O valkey.tar.gz "$VALKEY_DOWNLOAD_URL"; \ + echo "Unstable Valkey version, do not compare SHA256SUM" ;\ + \ mkdir -p /usr/src/valkey; \ tar -xzf valkey.tar.gz -C /usr/src/valkey --strip-components=1; \ rm valkey.tar.gz; \ \ # disable Redis protected mode [1] as it is unnecessary in context of Docker # (ports are not automatically exposed when running inside Docker, but rather explicitly by specifying -p / -P) -# [1]: https://github.com/valkey/valkey/commit/edd4d555df57dc84265fdfb4ef59a4678832f6da +# [1]: https://github.com/redis/redis/commit/edd4d555df57dc84265fdfb4ef59a4678832f6da grep -E '^ *createBoolConfig[(]"protected-mode",.*, *1 *,.*[)],$' /usr/src/valkey/src/config.c; \ sed -ri 's!^( *createBoolConfig[(]"protected-mode",.*, *)1( *,.*[)],)$!\10\2!' /usr/src/valkey/src/config.c; \ grep -E '^ *createBoolConfig[(]"protected-mode",.*, *0 *,.*[)],$' /usr/src/valkey/src/config.c; \ -# for future reference, we modify this directly in the source instead of just supplying a default configuration flag because apparently "if you specify any argument to valkey-server, [it assumes] you are going to specify everything" -# see also https://github.com/docker-library/valkey/issues/4#issuecomment-50780840 +# for future reference, we modify this directly in the source instead of just supplying a default configuration flag because apparently "if you specify any argument to redis-server, [it assumes] you are going to specify everything" +# see also https://github.com/docker-library/redis/issues/4#issuecomment-50780840 # (more exactly, this makes sure the default behavior of "save on SIGTERM" stays functional by default) \ # https://github.com/jemalloc/jemalloc/issues/467 -- we need to patch the "./configure" for the bundled jemalloc to match how Debian compiles, for compatibility @@ -104,7 +106,7 @@ RUN set -eux; \ make -C /usr/src/valkey -j "$(nproc)" all; \ make -C /usr/src/valkey install; \ \ -# TODO https://github.com/redis/redis/pull/3494 (deduplicate "valkey-server" copies) +# TODO https://github.com/redis/redis/pull/3494 (deduplicate "redis-server" copies) serverMd5="$(md5sum /usr/local/bin/valkey-server | cut -d' ' -f1)"; export serverMd5; \ find /usr/local/bin/valkey* -maxdepth 0 \ -type f -not -name valkey-server \ diff --git a/unstable/debian/Dockerfile b/unstable/debian/Dockerfile index b45933b..0a961dd 100644 --- a/unstable/debian/Dockerfile +++ b/unstable/debian/Dockerfile @@ -77,18 +77,20 @@ RUN set -eux; \ rm -rf /var/lib/apt/lists/*; \ \ wget -O valkey.tar.gz "$VALKEY_DOWNLOAD_URL"; \ + echo "Unstable Valkey version, do not compare SHA256SUM" ;\ + \ mkdir -p /usr/src/valkey; \ tar -xzf valkey.tar.gz -C /usr/src/valkey --strip-components=1; \ rm valkey.tar.gz; \ \ # disable Redis protected mode [1] as it is unnecessary in context of Docker # (ports are not automatically exposed when running inside Docker, but rather explicitly by specifying -p / -P) -# [1]: https://github.com/valkey/valkey/commit/edd4d555df57dc84265fdfb4ef59a4678832f6da +# [1]: https://github.com/redis/redis/commit/edd4d555df57dc84265fdfb4ef59a4678832f6da grep -E '^ *createBoolConfig[(]"protected-mode",.*, *1 *,.*[)],$' /usr/src/valkey/src/config.c; \ sed -ri 's!^( *createBoolConfig[(]"protected-mode",.*, *)1( *,.*[)],)$!\10\2!' /usr/src/valkey/src/config.c; \ grep -E '^ *createBoolConfig[(]"protected-mode",.*, *0 *,.*[)],$' /usr/src/valkey/src/config.c; \ -# for future reference, we modify this directly in the source instead of just supplying a default configuration flag because apparently "if you specify any argument to valkey-server, [it assumes] you are going to specify everything" -# see also https://github.com/docker-library/valkey/issues/4#issuecomment-50780840 +# for future reference, we modify this directly in the source instead of just supplying a default configuration flag because apparently "if you specify any argument to redis-server, [it assumes] you are going to specify everything" +# see also https://github.com/docker-library/redis/issues/4#issuecomment-50780840 # (more exactly, this makes sure the default behavior of "save on SIGTERM" stays functional by default) \ # https://github.com/jemalloc/jemalloc/issues/467 -- we need to patch the "./configure" for the bundled jemalloc to match how Debian compiles, for compatibility @@ -110,7 +112,7 @@ RUN set -eux; \ make -C /usr/src/valkey -j "$(nproc)" all; \ make -C /usr/src/valkey install; \ \ -# TODO https://github.com/valkey/valkey/pull/3494 (deduplicate "valkey-server" copies) +# TODO https://github.com/redis/redis/pull/3494 (deduplicate "redis-server" copies) serverMd5="$(md5sum /usr/local/bin/valkey-server | cut -d' ' -f1)"; export serverMd5; \ find /usr/local/bin/valkey* -maxdepth 0 \ -type f -not -name valkey-server \