Skip to content

Redis 8.12-rc2 and update alpine base for 6.2, 7.2, 7.4 - #22659

Merged
yosifkit merged 2 commits into
docker-library:masterfrom
redis-developer:redis_8.12_and_alpine_update
Nov 9, 2026
Merged

yosifkit merged 2 commits into
docker-library:masterfrom
redis-developer:redis_8.12_and_alpine_update

Conversation

@Peter-Sh

@Peter-Sh Peter-Sh commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Hi Docker Team!

Please consider merging this Redis update.

  • Redis 8.12-rc2, the real changelog is in 8.12-rc1
    • The image also introduces ENABLE_SOURCE_AWARE_CONFIG_REWRITE env var, doc PR for this
  • Updated Alpine from 3.21 to 3.22 for 6.2, 7.2 and 7.4 since Alpine reached end of life.

@github-actions

This comment has been minimized.

@yosifkit

yosifkit commented Nov 3, 2026

Copy link
Copy Markdown
Member

I recommend having users pass the value directly in the container command rather than using a temporary environment variable. This approach is equally straightforward, keeps the entrypoint clean, and prevents lingering technical debt.

$ docker run redis --config-rewrite-source-aware yes
# docker compose
command: --config-rewrite-source-aware=yes
command: [ "--config-rewrite-source-aware=yes" ]
command:
  - --config-rewrite-source-aware=yes
# k8s
args: [ "--config-rewrite-source-aware", "yes" ]
args:
  - --config-rewrite-source-aware
  - "yes"

@Peter-Sh

Peter-Sh commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Hi @yosifkit !

Thanks for the feedback.

The reason we introduced the environment variable is that this option was added as a hidden/experimental option, primarily intended for package integrations.

By exposing it through an environment variable in the Docker image, we retain some control over how we handle it in the future. For example, if the option gets deprecated or removed in a subsequent release, we can handle that on the image side without exposing users to the underlying change. We could, for instance, issue a warning if no is explicitly set, while silently ignoring the variable otherwise.

Passing the option directly as an argument would certainly work, but using an environment variable gives us a bit more flexibility to manage this transitional behavior.

@tianon

tianon commented Nov 4, 2026

Copy link
Copy Markdown
Member

That sounds like it's not something you intend for users to specify, is that accurate? 😅

The other half of this question would be if you do want to keep it as an environment variable, why not implement support for it directly in Redis itself (given y'all are upstream) instead of in the fragile integration scripts where testability and maintainability is lower?

@Peter-Sh

Peter-Sh commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Hi @tianon

That sounds like it's not something you intend for users to specify, is that accurate? 😅

Sort of. Upstream decided to introduce it that way. It is intended more for package maintainers, like those in Fedora. For Docker, I didn't want to change the default behavior because there is a risk of breaking someone's setup. But there are a number (1, 2) of users, mostly using replication setups, who would benefit from this change. So the intent was to give such users a way to get their problems fixed before the next major release.

An env var was chosen because:

  • It is a natural and widely recognized way to control containers.
  • It gives us an additional control point for the option.
  • It keeps the actual implementation behind the scenes.

The other half of this question would be if you do want to keep it as an environment variable, why not implement support for it directly in Redis itself (given y'all are upstream) instead of in the fragile integration scripts where testability and maintainability is lower?

It took a lot of effort to raise and solve this particular problem, starting with 1 and moving through several (rejected) PRs (2, 3, 4) and a lot of internal discussions. While I generally agree that supporting env vars directly in the core would be great, given that Redis is not currently configured through env vars, it looks quite unrealistic to add such support just for this option in the 8.12 release.

If you’d prefer not to introduce this env var, let's instead update just the documentation PR to expose the option itself, as @yosifkit suggested. The main goal is to make users aware of the rewrite issue and give them a way to resolve it.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Diff for e2fd213:
diff --git a/_bashbrew-cat b/_bashbrew-cat
index 2929b16..002f7fc 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -4,37 +4,37 @@ GitRepo: https://github.com/redis/docker-library-redis.git
 Tags: 6.2.24, 6.2, 6, 6.2.24-bookworm, 6.2-bookworm, 6-bookworm
 Architectures: amd64, arm32v7, arm64v8, i386, ppc64le
 GitFetch: refs/tags/v6.2.24
-GitCommit: d452a755b3fa51c0a8d26e254f29a25bf2272e3c
+GitCommit: d7e6fa4aed5f32798da5fbb59fc5028bdeaec137
 Directory: debian
 
-Tags: 6.2.24-alpine, 6.2-alpine, 6-alpine, 6.2.24-alpine3.21, 6.2-alpine3.21, 6-alpine3.21
+Tags: 6.2.24-alpine, 6.2-alpine, 6-alpine, 6.2.24-alpine3.22, 6.2-alpine3.22, 6-alpine3.22
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
 GitFetch: refs/tags/v6.2.24
-GitCommit: d452a755b3fa51c0a8d26e254f29a25bf2272e3c
+GitCommit: d7e6fa4aed5f32798da5fbb59fc5028bdeaec137
 Directory: alpine
 
 Tags: 7.2.17, 7.2, 7.2.17-bookworm, 7.2-bookworm
 Architectures: amd64, arm32v7, arm64v8, i386, ppc64le
 GitFetch: refs/tags/v7.2.17
-GitCommit: 41bd5f7bdf101142b029865bf727a97810ca8e02
+GitCommit: f40d1b25dbd4ab13868e764644d5e7298b3440c8
 Directory: debian
 
-Tags: 7.2.17-alpine, 7.2-alpine, 7.2.17-alpine3.21, 7.2-alpine3.21
+Tags: 7.2.17-alpine, 7.2-alpine, 7.2.17-alpine3.22, 7.2-alpine3.22
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
 GitFetch: refs/tags/v7.2.17
-GitCommit: 41bd5f7bdf101142b029865bf727a97810ca8e02
+GitCommit: f40d1b25dbd4ab13868e764644d5e7298b3440c8
 Directory: alpine
 
 Tags: 7.4.12, 7.4, 7, 7.4.12-bookworm, 7.4-bookworm, 7-bookworm
 Architectures: amd64, arm32v7, arm64v8, i386, ppc64le
 GitFetch: refs/tags/v7.4.12
-GitCommit: 786872f8c248c1f0990f93244cbcb3949329016d
+GitCommit: 346d38e447b5f2266de15081b60f952448c93594
 Directory: debian
 
-Tags: 7.4.12-alpine, 7.4-alpine, 7-alpine, 7.4.12-alpine3.21, 7.4-alpine3.21, 7-alpine3.21
+Tags: 7.4.12-alpine, 7.4-alpine, 7-alpine, 7.4.12-alpine3.22, 7.4-alpine3.22, 7-alpine3.22
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
 GitFetch: refs/tags/v7.4.12
-GitCommit: 786872f8c248c1f0990f93244cbcb3949329016d
+GitCommit: 346d38e447b5f2266de15081b60f952448c93594
 Directory: alpine
 
 Tags: 8.2.11, 8.2, 8.2.11-bookworm, 8.2-bookworm, 8-bookworm, bookworm
@@ -96,3 +96,15 @@ Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
 GitFetch: refs/tags/v8.10.3
 GitCommit: 8fd1238a62e5a6090d826e6d5fc53de6ce5f8a82
 Directory: alpine
+
+Tags: 8.12-rc2, 8.12-rc2-trixie
+Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
+GitFetch: refs/tags/v8.12-rc2
+GitCommit: 958dbeaca4436773438aa2c72f3e89cb8c5bece5
+Directory: debian
+
+Tags: 8.12-rc2-alpine, 8.12-rc2-alpine3.23
+Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, riscv64, s390x
+GitFetch: refs/tags/v8.12-rc2
+GitCommit: 958dbeaca4436773438aa2c72f3e89cb8c5bece5
+Directory: alpine
diff --git a/_bashbrew-list b/_bashbrew-list
index 43c752c..b5f601b 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -1,34 +1,34 @@
 redis:6
 redis:6-alpine
-redis:6-alpine3.21
+redis:6-alpine3.22
 redis:6-bookworm
 redis:6.2
 redis:6.2-alpine
-redis:6.2-alpine3.21
+redis:6.2-alpine3.22
 redis:6.2-bookworm
 redis:6.2.24
 redis:6.2.24-alpine
-redis:6.2.24-alpine3.21
+redis:6.2.24-alpine3.22
 redis:6.2.24-bookworm
 redis:7
 redis:7-alpine
-redis:7-alpine3.21
+redis:7-alpine3.22
 redis:7-bookworm
 redis:7.2
 redis:7.2-alpine
-redis:7.2-alpine3.21
+redis:7.2-alpine3.22
 redis:7.2-bookworm
 redis:7.2.17
 redis:7.2.17-alpine
-redis:7.2.17-alpine3.21
+redis:7.2.17-alpine3.22
 redis:7.2.17-bookworm
 redis:7.4
 redis:7.4-alpine
-redis:7.4-alpine3.21
+redis:7.4-alpine3.22
 redis:7.4-bookworm
 redis:7.4.12
 redis:7.4.12-alpine
-redis:7.4.12-alpine3.21
+redis:7.4.12-alpine3.22
 redis:7.4.12-bookworm
 redis:8
 redis:8-alpine
@@ -76,6 +76,10 @@ redis:8.10.3
 redis:8.10.3-alpine
 redis:8.10.3-alpine3.23
 redis:8.10.3-trixie
+redis:8.12-rc2
+redis:8.12-rc2-alpine
+redis:8.12-rc2-alpine3.23
+redis:8.12-rc2-trixie
 redis:alpine
 redis:alpine3.22
 redis:alpine3.23
diff --git a/_bashbrew-list-build-order b/_bashbrew-list-build-order
index 9e6c9da..ae3ab19 100644
--- a/_bashbrew-list-build-order
+++ b/_bashbrew-list-build-order
@@ -1,8 +1,8 @@
-redis:6-alpine3.21
+redis:6-alpine3.22
 redis:6-bookworm
-redis:7-alpine3.21
+redis:7-alpine3.22
 redis:7-bookworm
-redis:7.2-alpine3.21
+redis:7.2-alpine3.22
 redis:7.2-bookworm
 redis:8.2-alpine3.22
 redis:8.4-trixie
@@ -10,6 +10,8 @@ redis:8.6-alpine3.23
 redis:8.6-trixie
 redis:8.8-alpine3.23
 redis:8.8-trixie
+redis:8.12-rc2-alpine3.23
+redis:8.12-rc2-trixie
 redis:alpine3.22
 redis:alpine3.23
 redis:bookworm
diff --git a/redis_6-alpine3.21/Dockerfile b/redis_6-alpine3.22/Dockerfile
similarity index 99%
rename from redis_6-alpine3.21/Dockerfile
rename to redis_6-alpine3.22/Dockerfile
index 82be77e..ad89c40 100644
--- a/redis_6-alpine3.21/Dockerfile
+++ b/redis_6-alpine3.22/Dockerfile
@@ -1,4 +1,4 @@
-FROM alpine:3.21
+FROM alpine:3.22
 
 # add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
 RUN set -eux; \
diff --git a/redis_6-alpine3.21/docker-entrypoint.sh b/redis_6-alpine3.22/docker-entrypoint.sh
similarity index 89%
copy from redis_6-alpine3.21/docker-entrypoint.sh
copy to redis_6-alpine3.22/docker-entrypoint.sh
index d941bbd..f586a5d 100755
--- a/redis_6-alpine3.21/docker-entrypoint.sh
+++ b/redis_6-alpine3.22/docker-entrypoint.sh
@@ -10,7 +10,7 @@ fi
 # allow the container to be started with `--user`
 if [ "$1" = 'redis-server' ] && [ "$(id -u)" = '0' ]; then
 	find . \! -user redis -exec chown redis '{}' +
-	exec /usr/bin/setpriv --reuid redis --regid redis --clear-groups "$0" "$@"
+	exec /bin/setpriv --reuid redis --regid redis --clear-groups "$0" "$@"
 fi
 
 # set an appropriate umask (if one isn't set already)
diff --git a/redis_7-alpine3.21/Dockerfile b/redis_7-alpine3.22/Dockerfile
similarity index 99%
rename from redis_7-alpine3.21/Dockerfile
rename to redis_7-alpine3.22/Dockerfile
index b703669..1fe895a 100644
--- a/redis_7-alpine3.21/Dockerfile
+++ b/redis_7-alpine3.22/Dockerfile
@@ -1,4 +1,4 @@
-FROM alpine:3.21
+FROM alpine:3.22
 
 # add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
 RUN set -eux; \
diff --git a/redis_7-alpine3.21/docker-entrypoint.sh b/redis_7-alpine3.22/docker-entrypoint.sh
similarity index 89%
rename from redis_7-alpine3.21/docker-entrypoint.sh
rename to redis_7-alpine3.22/docker-entrypoint.sh
index d941bbd..f586a5d 100755
--- a/redis_7-alpine3.21/docker-entrypoint.sh
+++ b/redis_7-alpine3.22/docker-entrypoint.sh
@@ -10,7 +10,7 @@ fi
 # allow the container to be started with `--user`
 if [ "$1" = 'redis-server' ] && [ "$(id -u)" = '0' ]; then
 	find . \! -user redis -exec chown redis '{}' +
-	exec /usr/bin/setpriv --reuid redis --regid redis --clear-groups "$0" "$@"
+	exec /bin/setpriv --reuid redis --regid redis --clear-groups "$0" "$@"
 fi
 
 # set an appropriate umask (if one isn't set already)
diff --git a/redis_7.2-alpine3.21/docker-entrypoint.sh b/redis_7.2-alpine3.21/docker-entrypoint.sh
deleted file mode 100755
index d941bbd..0000000
diff --git a/redis_7.2-alpine3.21/Dockerfile b/redis_7.2-alpine3.22/Dockerfile
similarity index 99%
rename from redis_7.2-alpine3.21/Dockerfile
rename to redis_7.2-alpine3.22/Dockerfile
index 6e63c9a..d1693cc 100644
--- a/redis_7.2-alpine3.21/Dockerfile
+++ b/redis_7.2-alpine3.22/Dockerfile
@@ -1,4 +1,4 @@
-FROM alpine:3.21
+FROM alpine:3.22
 
 # add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
 RUN set -eux; \
diff --git a/redis_6-alpine3.21/docker-entrypoint.sh b/redis_7.2-alpine3.22/docker-entrypoint.sh
similarity index 89%
rename from redis_6-alpine3.21/docker-entrypoint.sh
rename to redis_7.2-alpine3.22/docker-entrypoint.sh
index d941bbd..f586a5d 100755
--- a/redis_6-alpine3.21/docker-entrypoint.sh
+++ b/redis_7.2-alpine3.22/docker-entrypoint.sh
@@ -10,7 +10,7 @@ fi
 # allow the container to be started with `--user`
 if [ "$1" = 'redis-server' ] && [ "$(id -u)" = '0' ]; then
 	find . \! -user redis -exec chown redis '{}' +
-	exec /usr/bin/setpriv --reuid redis --regid redis --clear-groups "$0" "$@"
+	exec /bin/setpriv --reuid redis --regid redis --clear-groups "$0" "$@"
 fi
 
 # set an appropriate umask (if one isn't set already)
diff --git a/redis_alpine3.23/Dockerfile b/redis_8.12-rc2-alpine3.23/Dockerfile
similarity index 97%
copy from redis_alpine3.23/Dockerfile
copy to redis_8.12-rc2-alpine3.23/Dockerfile
index 1d96ac4..d382ca5 100644
--- a/redis_alpine3.23/Dockerfile
+++ b/redis_8.12-rc2-alpine3.23/Dockerfile
@@ -14,9 +14,9 @@ RUN set -eux; \
 # we need setpriv package as busybox provides very limited functionality
 		setpriv \
 	;
-ENV REDIS_VERSION=8.10.3
-ARG REDIS_DOWNLOAD_URL=https://github.com/redis/redis/releases/download/8.10.3/redis-full.tar.gz
-ARG REDIS_DOWNLOAD_SHA=5e0c00ed77f789fb1a4a30f1fbb58a793cc88c41c0f11f0e38e1b4f192991188
+ENV REDIS_VERSION=8.12-rc2
+ARG REDIS_DOWNLOAD_URL=https://github.com/redis/redis/releases/download/8.12-rc2/redis-full-8.12-rc2.tar.gz
+ARG REDIS_DOWNLOAD_SHA=a6f861440905925b793035712ec1ed6de1ef16bc9725220ae94a694fcd28474f
 RUN set -eux; \
 	\
 	apk add --no-cache --virtual .build-deps \
diff --git a/redis_8.2-alpine3.22/docker-entrypoint.sh b/redis_8.12-rc2-alpine3.23/docker-entrypoint.sh
similarity index 95%
copy from redis_8.2-alpine3.22/docker-entrypoint.sh
copy to redis_8.12-rc2-alpine3.23/docker-entrypoint.sh
index ddbd124..fe153a4 100755
--- a/redis_8.2-alpine3.22/docker-entrypoint.sh
+++ b/redis_8.12-rc2-alpine3.23/docker-entrypoint.sh
@@ -97,8 +97,12 @@ if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then
 fi
 CMD=$(command -v "$1" 2>/dev/null || :)
 
+# redis-sentinel, redis-check-aof and redis-check-rdb are all symlinks to
+# redis-server; only the server and sentinel accept server arguments
 if [ "$(readlink -f "$CMD")" = '/usr/local/bin/redis-server' ]; then
-	IS_REDIS_SERVER=1
+	case "$(basename "$CMD")" in
+		redis-server|redis-sentinel) IS_REDIS_SERVER=1 ;;
+	esac
 fi
 
 if check_for_sentinel "$CMD" "$@"; then
diff --git a/redis_trixie/Dockerfile b/redis_8.12-rc2-trixie/Dockerfile
similarity index 97%
copy from redis_trixie/Dockerfile
copy to redis_8.12-rc2-trixie/Dockerfile
index 004f914..fdf25b9 100644
--- a/redis_trixie/Dockerfile
+++ b/redis_8.12-rc2-trixie/Dockerfile
@@ -14,9 +14,9 @@ RUN set -eux; \
 	; \
 	rm -rf /var/lib/apt/lists/*
 
-ENV REDIS_VERSION=8.10.3
-ARG REDIS_DOWNLOAD_URL=https://github.com/redis/redis/releases/download/8.10.3/redis-full.tar.gz
-ARG REDIS_DOWNLOAD_SHA=5e0c00ed77f789fb1a4a30f1fbb58a793cc88c41c0f11f0e38e1b4f192991188
+ENV REDIS_VERSION=8.12-rc2
+ARG REDIS_DOWNLOAD_URL=https://github.com/redis/redis/releases/download/8.12-rc2/redis-full-8.12-rc2.tar.gz
+ARG REDIS_DOWNLOAD_SHA=a6f861440905925b793035712ec1ed6de1ef16bc9725220ae94a694fcd28474f
 
 RUN set -eux; \
 	\
diff --git a/redis_8.8-trixie/docker-entrypoint.sh b/redis_8.12-rc2-trixie/docker-entrypoint.sh
similarity index 95%
copy from redis_8.8-trixie/docker-entrypoint.sh
copy to redis_8.12-rc2-trixie/docker-entrypoint.sh
index d0a21fe..2861755 100755
--- a/redis_8.8-trixie/docker-entrypoint.sh
+++ b/redis_8.12-rc2-trixie/docker-entrypoint.sh
@@ -97,8 +97,12 @@ if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then
 fi
 CMD=$(command -v "$1" 2>/dev/null || :)
 
+# redis-sentinel, redis-check-aof and redis-check-rdb are all symlinks to
+# redis-server; only the server and sentinel accept server arguments
 if [ "$(readlink -f "$CMD")" = '/usr/local/bin/redis-server' ]; then
-	IS_REDIS_SERVER=1
+	case "$(basename "$CMD")" in
+		redis-server|redis-sentinel) IS_REDIS_SERVER=1 ;;
+	esac
 fi
 
 if check_for_sentinel "$CMD" "$@"; then

Relevant Maintainers:

@Peter-Sh

Peter-Sh commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Hi @yosifkit and @tianon !

I removed the env var and updated the docs to reflect the option directly as @yosifkit suggested. Please, re-review.

Also meanwhile one minor fix for the entrypoint has been merged here: redis/docker-library-redis#569

@yosifkit
yosifkit merged commit 04c9f0f into docker-library:master Nov 9, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants