Redis is the world’s fastest data platform for caching, vector search, and NoSQL databases.
2.0K
A Redis image with TLS/SSL support, self-signed certificate generation, and environment-based configuration. Supports both TLS and non-TLS connections simultaneously.
# Pull
docker pull vothanhlong741/redis-ssl:latest
# Run with TLS enabled
docker run -d \
--name redis-ssl \
-p 6379:6379 \
-p 6380:6380 \
-e REDIS_ENABLE_TLS=yes \
-e REDIS_DEFAULT_PASSWORD=mydefaultpassword \
-e REDIS_AUTH_USERNAME=myuser \
-e REDIS_AUTH_PASSWORD=mypassword \
vothanhlong741/redis-ssl:latest
| Variable | Default | Description |
|---|---|---|
REDIS_ENABLE_TLS | no | Enable TLS mode (yes or no) |
REDIS_ENABLE_PORT | yes | Enable non-TLS port (yes or no) |
REDIS_TLS_PORT | 6380 | TLS port number |
REDIS_PORT | 6379 | Non-TLS port number |
REDIS_TLS_SAN_DOMAINS | (none) | Additional SAN entries, comma-separated (e.g. host1,host2) |
REDIS_ENABLE_TLS_AUTH_CLIENT | no | Require client certificates for TLS (yes or no) |
REDIS_DEFAULT_PASSWORD | default | Default user's password |
REDIS_AUTH_USERNAME | (none) | Additional user for authentication |
REDIS_AUTH_PASSWORD | (none) | Additional user's password |
When REDIS_ENABLE_TLS=yes, self-signed certificates are generated in /opt/certs/ and the TLS port is enabled. The non-TLS port behavior depends on REDIS_ENABLE_PORT.
docker run -d \
--name redis-ssl \
-p 6380:6380 \
-e REDIS_ENABLE_TLS=yes \
-e REDIS_ENABLE_PORT=no \
-e REDIS_DEFAULT_PASSWORD=mydefaultpassword \
vothanhlong741/redis-ssl:latest
services:
redis:
image: vothanhlong741/redis-ssl:latest
ports:
- "6379:6379"
- "6380:6380"
environment:
- REDIS_ENABLE_TLS=yes
- REDIS_DEFAULT_PASSWORD=defaultpass
- REDIS_AUTH_USERNAME=appuser
- REDIS_AUTH_PASSWORD=secretpassword
- REDIS_ENABLE_TLS_AUTH_CLIENT=no
volumes:
- redis-data:/data
volumes:
redis-data:
TLS:
redis-cli -h localhost -p 6380 --tls \
--cert /opt/certs/server.crt \
--key /opt/certs/server.key \
--cacert /opt/certs/root.crt \
-a mypassword
Non-TLS:
redis-cli -h localhost -p 6379 -a mypassword
| Path | Description |
|---|---|
/opt/redis/system.conf | Redis configuration (generated) |
/opt/certs/server.crt | TLS server certificate |
/opt/certs/server.key | TLS private key |
/opt/certs/root.crt | CA certificate |
docker run -d \
--name redis-ssl \
-v redis-data:/data \
-e REDIS_ENABLE_TLS=yes \
vothanhlong741/redis-ssl:latest
REDIS_DEFAULT_PASSWORD and REDIS_AUTH_PASSWORDREDIS_ENABLE_PORT=noREDIS_ENABLE_TLS_AUTH_CLIENT=yesContent type
Image
Digest
sha256:47ac5be16…
Size
46.6 MB
Last updated
6 days ago
docker pull vothanhlong741/redis-ssl