run redis rootless and distroless
10K+

run redis rootless and distroless
For developers, who are building real-time data-driven applications, Redis is the preferred, fastest, and most feature-rich cache, data structure server, and document and vector query engine.

What can I do with this? This image will run redis rootlessβ and distrolessβ for more security. Besides being more secure and slim than most images, it also offers additional start parameters to either start Redis in command mode, as a replica or as a in-memory database that persists nothing to disk. Simply provide the command needed:
REDIS_HOST environment variableWhy should I run this image and not the other image(s) that already exist? Good question! Because ...
If you value security, simplicity and optimizations to the extreme, then this image might be for you.
Below you find a comparison between this image and the most used or original one.
| image | size on disk | init default as | distrolessβ | supported architectures |
|---|---|---|---|---|
| 11notes/redis | 21MB | 1000:1000 | β | amd64, arm64, armv7 |
| redis | 146MB | 0:0 | β | 386, amd64, arm64v8, armv5, armv7, ppc64le, riscv64, s390x |
Checkout compose.secrets.ymlβ if you want to use secrets instead of environment variables.
name: "kv"
x-lockdown: &lockdown
# prevents write access to the image itself
read_only: true
# prevents any process within the container to gain more privileges
security_opt:
- "no-new-privileges=true"
x-image-redis: &image
image: "11notes/redis:8.10.2"
<<: *lockdown
services:
redis:
<<: *image
environment:
REDIS_PASSWORD: "${REDIS_PASSWORD}"
TZ: "Europe/Zurich"
networks:
backend:
volumes:
- "redis.etc:/redis/etc"
- "redis.var:/redis/var"
tmpfs:
- "/run:uid=1000,gid=1000"
restart: "always"
# start a replica of redis
replica:
<<: *image
environment:
REDIS_PASSWORD: "${REDIS_PASSWORD}"
TZ: "Europe/Zurich"
command: "--replica redis"
networks:
backend:
volumes:
- "replica.etc:/redis/etc"
- "replica.var:/redis/var"
tmpfs:
- "/run:uid=1000,gid=1000"
restart: "always"
# start Redis only in-memory
in-memory:
<<: *image
environment:
REDIS_PASSWORD: "${REDIS_PASSWORD}"
TZ: "Europe/Zurich"
command: "--in-memory"
networks:
backend:
volumes:
- "in-memory.etc:/redis/etc"
tmpfs:
- "/run:uid=1000,gid=1000"
restart: "always"
# execute CLI commands via redis-cli
cli:
<<: *image
depends_on:
redis:
condition: "service_healthy"
restart: true
environment:
REDIS_HOST: "redis"
REDIS_PASSWORD: "${REDIS_PASSWORD}"
TZ: "Europe/Zurich"
# start redis in cmd mode
entrypoint: ["/usr/local/bin/redis", "--cmd"]
# commands to execute in order
command:
- PING
- --version
- SET key value NX
- GET key
networks:
backend:
# demo container to actually view the databases
gui:
image: "redis/redisinsight"
environment:
RI_REDIS_HOST0: "redis"
RI_REDIS_PASSWORD0: "${REDIS_PASSWORD}"
RI_REDIS_HOST1: "replica"
RI_REDIS_PASSWORD1: "${REDIS_PASSWORD}"
RI_REDIS_HOST2: "in-memory"
RI_REDIS_PASSWORD2: "${REDIS_PASSWORD}"
TZ: "Europe/Zurich"
ports:
- "3000:5540/tcp"
networks:
backend:
frontend:
volumes:
redis.etc:
redis.var:
replica.etc:
replica.var:
in-memory.etc:
networks:
frontend:
backend:
internal: true
To find out how you can change the default UID/GID of this container image, consult the RTFMβ .
| Parameter | Value | Description |
|---|---|---|
user | docker | user name |
uid | 1000 | user identifierβ |
gid | 1000 | group identifierβ |
home | /redis | home directory of user docker |
| Parameter | Value | Default |
|---|---|---|
TZ | Time Zoneβ | |
DEBUG | Will activate debug option for container image and app (if available) | |
REDIS_PASSWORD | Password used for authentication | |
REDIS_PASSWORD_FILE (optional) | Secrets file containing the password for authentication (check compose.secrets.ymlβ ) | |
REDIS_IP (optional) | IP of Redis server | 0.0.0.0 |
REDIS_PORT (optional) | Port of Redis server | 6379 |
REDIS_HOST (optional) | IP of upstream Redis server when using --cmd | |
REDISCLI_HISTFILE (optional) | Disable history of redis-cli (for security) | /dev/null |
These are the main tags for the image. There is also a tag for each commit and its shorthand sha256 value.
It is my opinion that the :latest tag is a bad habbit and should not be used at all. Many developers introduce breaking changes in new releases. This would messed up everything for people who use :latest. If you donβt want to change the tag to the latest semverβ , simply use the short versions of semverβ . Instead of using :8.10.2 you can use :8 or :8.10. Since on each new version these tags are updated to the latest version of the software, using them is identical to using :latest but at least fixed to a major or minor version. Which in theory should not introduce breaking changes.
If you still insist on having the bleeding edge release of this app, simply use the :rolling tag, but be warned! You will get the latest version of the app instantly, regardless of breaking changes or security issues or what so ever. You do this at your own risk!
docker pull 11notes/redis:8.10.2
docker pull ghcr.io/11notes/redis:8.10.2
docker pull quay.io/11notes/redis:8.10.2
This image supports unraid by default. Simply add -unraid to any tag and the image will run as 99:100 instead of 1000:1000.
This image supports nobody by default. Simply add -nobody to any tag and the image will run as 65534:65534 instead of 1000:1000.
This image is not based on another image but uses scratchβ as the starting layer. The image consists of the following distroless layers that were added:
This image is provided to you at your own risk. Always make backups before updating an image to a different version. Check the releasesβ for breaking changes. If you have any problems with using this image simply raise an issueβ , thanks. If you have a question or inputs please create a new discussionβ instead of an issue. You can find all my other repositories on githubβ .
created 18.09.2026, 06:05:17 (CET)
Sentinel mode will follow soon as well as the possibility to change the announce IP and port β©β
Content type
Image
Digest
sha256:6fcd2d842β¦
Size
18.9 MB
Last updated
2 days ago
docker pull 11notes/redis:8.10.2-unraid