This repository contains a developer-friendly, preconfigured Redis image for Docker, based on the official Redis Alpine image.
This project is maintained by ❤️ by @agence-adeliom. And images are used for our projects and clients. This work is open-source and publicly available, but we do not provide any guarantee or official support. Use at your own risk and always test thoroughly before deploying to production.
| Name | Redis version | Architecture |
|---|---|---|
adeliom/redis:6.2 | 6.2 | amd64/arm64 |
adeliom/redis:7.0 | 7.0 | amd64/arm64 |
adeliom/redis:7.2 | 7.2 | amd64/arm64 |
adeliom/redis:8.2 | 8.2 | amd64/arm64 |
adeliom/redis:8.10 | 8.10 | amd64/arm64 |
adeliom/redis:latest | 8.10 | amd64/arm64 |
Using latest tags is a good way to stay up to date, but sometimes you need more control over the version you are using.
All detailed images are the latest stable versions. You can also use specific versions by adding a -{specific-version} part in the image name:
Example: adeliom/redis:8.10-dev or adeliom/redis:8.10-1.0.0
1.0.0, 1.0.1, etc.). See releases listdev tag is used for the new version. Do not use this tag in production.To stay up to date, you can use the default tag, which is always pointing to the latest stable version.
# Run Redis with password
docker run -d --name my-redis \
-e REDIS_PASSWORD=my-secure-password \
-p 6379:6379 \
adeliom/redis:8.10
# Run Redis with custom port
docker run -d --name my-redis \
-e REDIS_PASSWORD=my-secure-password \
-e REDIS_PORT_NUMBER=6380 \
-p 6380:6380 \
adeliom/redis:8.10
# Run Redis for development (no password)
docker run -d --name my-redis-dev \
-e ALLOW_EMPTY_PASSWORD=yes \
-p 6379:6379 \
adeliom/redis:8.10
version: '3.8'
services:
redis:
image: adeliom/redis:8.10
container_name: my-redis
restart: unless-stopped
environment:
- REDIS_PASSWORD=my-secure-password
- REDIS_PORT_NUMBER=6379
- REDIS_DATABASE=16
- REDIS_AOF_ENABLED=yes
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL,CONFIG
ports:
- "6379:6379"
volumes:
- redis_data:/adeliom/redis/data
- redis_logs:/adeliom/redis/logs
volumes:
redis_data:
redis_logs:
The data directory structure in the image:
| Directory | Purpose |
|---|---|
/adeliom/redis/data | Redis data files |
/adeliom/redis/logs | Redis log files |
/adeliom/redis/conf | Redis configuration |
/adeliom/redis/tmp | Temporary files |
You can configure Redis using the following environment variables:
| Variable | Description | Default |
|---|---|---|
ALLOW_EMPTY_PASSWORD | Allow empty password (dev only) | no |
REDIS_PASSWORD | Redis password | |
REDIS_PASSWORD_FILE | Path to file containing Redis password | |
REDIS_PORT_NUMBER | Redis listening port | 6379 |
REDIS_DATABASE | Number of databases | 16 |
| Variable | Description | Default |
|---|---|---|
REDIS_AOF_ENABLED | Enable AOF persistence | yes |
REDIS_RDB_POLICY | Custom RDB save policy | |
REDIS_RDB_POLICY_DISABLED | Disable RDB persistence | no |
RDB Policy Format: <seconds> <changes> [<seconds> <changes> ...]
Example: REDIS_RDB_POLICY="900 1 300 10 60 10000" means:
| Variable | Description | Default |
|---|---|---|
REDIS_IO_THREADS | Number of I/O threads | |
REDIS_IO_THREADS_DO_READS | Enable threaded reads | no |
| Variable | Description | Default |
|---|---|---|
REDIS_DISABLE_COMMANDS | Comma-separated list of commands to disable | |
Example: REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL,CONFIG,KEYS
| Variable | Description | Default |
|---|---|---|
MODE_DEBUG | Enable debug mode | false |
TZ | Timezone | Europe/Paris |
services:
redis:
image: adeliom/redis:8.10
environment:
# Strong password
- REDIS_PASSWORD=MyVerySecurePassword123!
# Disable dangerous commands
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL,CONFIG,KEYS,DEBUG
# Enable both persistence methods
- REDIS_AOF_ENABLED=yes
- REDIS_RDB_POLICY=900 1 300 10 60 10000
volumes:
- redis_data:/adeliom/redis/data
services:
redis-dev:
image: adeliom/redis:8.10
environment:
# No password in development
- ALLOW_EMPTY_PASSWORD=yes
# Disable AOF for better performance
- REDIS_AOF_ENABLED=no
# Enable debug logging
- MODE_DEBUG=true
services:
redis:
image: adeliom/redis:8.10
environment:
- REDIS_PASSWORD_FILE=/run/secrets/redis_password
secrets:
- redis_password
secrets:
redis_password:
file: ./secrets/redis_password.txt
Two persistence mechanisms are available:
/adeliom/redis/data/appendonly.aofdocker run -d \
-e REDIS_AOF_ENABLED=yes \
adeliom/redis:8.10
/adeliom/redis/data/dump.rdb# Custom RDB policy
docker run -d \
-e REDIS_RDB_POLICY="3600 1 300 100 60 10000" \
adeliom/redis:8.10
# Disable RDB completely
docker run -d \
-e REDIS_RDB_POLICY_DISABLED=yes \
adeliom/redis:8.10
docker run -d \
-e REDIS_AOF_ENABLED=no \
-e REDIS_RDB_POLICY_DISABLED=yes \
adeliom/redis:8.10
⚠️ Warning: Disabling both persistence methods means data loss on container restart.
Starting from Redis 6.0, you can enable multi-threaded I/O:
services:
redis:
image: adeliom/redis:8.10
environment:
# Use 4 I/O threads
- REDIS_IO_THREADS=4
# Enable threaded reads (Redis 6.2+)
- REDIS_IO_THREADS_DO_READS=yes
Note:
REDIS_IO_THREADS to the number of CPU cores for best performanceREDIS_IO_THREADS_DO_READS requires Redis 6.2 or higherThe image includes a built-in health check:
docker inspect --format='{{.State.Health.Status}}' my-redis
# Without password (development)
docker exec my-redis redis-cli ping
# With password
docker exec my-redis redis-cli -a my-password ping
# Full info
docker exec my-redis redis-cli -a my-password INFO
# Specific section
docker exec my-redis redis-cli -a my-password INFO server
docker exec my-redis redis-cli -a my-password INFO memory
docker exec my-redis redis-cli -a my-password INFO stats
services:
redis:
image: adeliom/redis:8.10
environment:
- REDIS_PASSWORD=my-password
redis-commander:
image: rediscommander/redis-commander:latest
environment:
- REDIS_HOSTS=local:redis:6379:0:my-password
- HTTP_USER=admin
- HTTP_PASSWORD=admin
ports:
- "8081:8081"
depends_on:
- redis
Access the UI at http://localhost:8081
# Check logs
docker logs my-redis
# Check configuration
docker exec my-redis cat /adeliom/redis/conf/redis.conf
# Test connection
docker exec my-redis redis-cli ping
# Check listening port
docker exec my-redis netstat -tlnp | grep redis
# Verify environment variables
docker exec my-redis env | grep REDIS
# Check volume permissions
docker volume inspect redis_data
# Ensure redis user owns the data directory
docker exec my-redis ls -la /adeliom/redis/data
# Verify password is set
docker exec my-redis grep "requirepass" /adeliom/redis/conf/redis.conf
# Check if ALLOW_EMPTY_PASSWORD is set
docker exec my-redis env | grep ALLOW_EMPTY_PASSWORD
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
spec:
replicas: 1
selector:
matchLabels:
app: redis
template:
metadata:
labels:
app: redis
spec:
containers:
- name: redis
image: adeliom/redis:8.10
env:
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: redis-secret
key: password
- name: REDIS_PORT_NUMBER
value: "6379"
- name: REDIS_DATABASE
value: "16"
- name: REDIS_AOF_ENABLED
value: "yes"
- name: REDIS_DISABLE_COMMANDS
value: "FLUSHDB,FLUSHALL,CONFIG"
ports:
- containerPort: 6379
volumeMounts:
- name: data
mountPath: /adeliom/redis/data
livenessProbe:
exec:
command:
- /opt/adeliom/scripts/redis/healthcheck.sh
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
exec:
command:
- /opt/adeliom/scripts/redis/healthcheck.sh
initialDelaySeconds: 5
periodSeconds: 5
volumes:
- name: data
persistentVolumeClaim:
claimName: redis-pvc
---
apiVersion: v1
kind: Secret
metadata:
name: redis-secret
type: Opaque
stringData:
password: your-secure-password-here
You can deploy Redis using Helm with a custom values file.
Create a redis-values.yaml file:
# redis-values.yaml
image:
registry: docker.io
repository: adeliom/redis
tag: 8.10
pullPolicy: IfNotPresent
# Redis configuration
auth:
enabled: true
password: "your-secure-password"
# Or use existing secret
# existingSecret: "redis-secret"
# existingSecretPasswordKey: "password"
# Environment variables
env:
- name: REDIS_PORT_NUMBER
value: "6379"
- name: REDIS_DATABASE
value: "16"
- name: REDIS_AOF_ENABLED
value: "yes"
- name: REDIS_RDB_POLICY
value: "900 1 300 10 60 10000"
- name: REDIS_DISABLE_COMMANDS
value: "FLUSHDB,FLUSHALL,CONFIG,KEYS"
- name: REDIS_IO_THREADS
value: "4"
- name: REDIS_IO_THREADS_DO_READS
value: "yes"
# Service configuration
service:
type: ClusterIP
port: 6379
# Persistence
persistence:
enabled: true
storageClass: "" # Use default storage class
size: 8Gi
mountPath: /adeliom/redis/data
# Resources
resources:
limits:
memory: 512Mi
cpu: 500m
requests:
memory: 256Mi
cpu: 250m
# Health checks
livenessProbe:
enabled: true
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 5
exec:
command:
- /opt/adeliom/scripts/redis/healthcheck.sh
readinessProbe:
enabled: true
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 3
exec:
command:
- /opt/adeliom/scripts/redis/healthcheck.sh
# Security context
podSecurityContext:
fsGroup: 1001
securityContext:
runAsUser: 999
runAsNonRoot: true
# Node selector
nodeSelector: {}
# Tolerations
tolerations: []
# Affinity
affinity: {}
For a simpler deployment, create a minimal Helm chart structure:
# Create chart directory
mkdir -p redis-chart/templates
# Create Chart.yaml
cat > redis-chart/Chart.yaml <<EOF
apiVersion: v2
name: redis-adeliom
description: Redis Adeliom Helm chart
type: application
version: 1.0.0
appVersion: "8.10"
EOF
# Create values.yaml
cat > redis-chart/values.yaml <<EOF
image:
repository: adeliom/redis
tag: 8.10
pullPolicy: IfNotPresent
redis:
password: "change-me"
port: 6379
database: 16
persistence:
enabled: true
size: 8Gi
resources:
limits:
memory: 512Mi
requests:
memory: 256Mi
EOF
# Create deployment template
cat > redis-chart/templates/deployment.yaml <<'EOF'
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-redis
labels:
app: {{ .Release.Name }}-redis
spec:
replicas: 1
selector:
matchLabels:
app: {{ .Release.Name }}-redis
template:
metadata:
labels:
app: {{ .Release.Name }}-redis
spec:
containers:
- name: redis
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: REDIS_PASSWORD
value: "{{ .Values.redis.password }}"
- name: REDIS_PORT_NUMBER
value: "{{ .Values.redis.port }}"
- name: REDIS_DATABASE
value: "{{ .Values.redis.database }}"
- name: REDIS_AOF_ENABLED
value: "yes"
ports:
- containerPort: {{ .Values.redis.port }}
volumeMounts:
- name: data
mountPath: /adeliom/redis/data
resources:
{{- toYaml .Values.resources | nindent 10 }}
volumes:
- name: data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ .Release.Name }}-redis-pvc
{{- else }}
emptyDir: {}
{{- end }}
EOF
# Install Redis
helm install my-redis ./redis-chart \
--set redis.password=my-secure-password \
--namespace redis \
--create-namespace
# Or with values file
helm install my-redis ./redis-chart \
-f redis-values.yaml \
--namespace redis \
--create-namespace
# Upgrade
helm upgrade my-redis ./redis-chart \
-f redis-values.yaml \
--namespace redis
# Uninstall
helm uninstall my-redis --namespace redis
Create an Application manifest:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: redis-adeliom
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/your-org/helm-charts
targetRevision: HEAD
path: redis-adeliom
helm:
values: |
image:
repository: adeliom/redis
tag: 8.10
redis:
password: "secure-password"
persistence:
enabled: true
size: 10Gi
destination:
server: https://kubernetes.default.svc
namespace: production
syncPolicy:
automated:
prune: true
selfHeal: true
# Dry run
helm install my-redis ./redis-chart \
--dry-run --debug \
-f redis-values.yaml
# Test connection after deployment
kubectl run redis-test --rm -it --restart=Never \
--image=redis:alpine -- \
redis-cli -h my-redis-redis -a your-password ping
# Check status
helm status my-redis --namespace redis
# Get values
helm get values my-redis --namespace redis
You can use a custom Redis configuration file:
services:
redis:
image: adeliom/redis:8.10
environment:
- REDIS_PASSWORD=my-password
volumes:
- ./my-redis.conf:/opt/adeliom/redis/redis.conf.default:ro
- redis_data:/adeliom/redis/data
See config/ directory for configuration examples:
redis.conf - Balanced default configurationredis-dev.conf - Development configurationredis-prod.conf - Production configurationAlways use a password in production
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD} # Use environment variable
Enable both AOF and RDB for maximum durability
environment:
- REDIS_AOF_ENABLED=yes
- REDIS_RDB_POLICY=900 1 300 10 60 10000
Disable dangerous commands in production
environment:
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL,CONFIG,KEYS,DEBUG
Use volumes for data persistence
volumes:
- redis_data:/adeliom/redis/data
Monitor memory usage and set appropriate limits
Regular backups of your data directory
Use secrets for password management in production
/adeliom/redis/MODE_DEBUG=trueIf you want to build the image yourself:
# Clone the repository
git clone https://github.com/agence-adeliom/docker-images.git
cd docker-images/redis
# Build the image
docker build --build-arg REDIS_VERSION=8.10 -t adeliom/redis:8.10 .
Made with ❤️ by @agence-adeliom
Content type
Image
Digest
sha256:483b0d630…
Size
18.5 MB
Last updated
10 days ago
docker pull adeliom/redis