Redis with modules for amd64 and arm64.
Default redis.conf can be enriched from environment variables.
Latest stable version.
Specific stable version. v7.0.2
for example.
Latest main
branch build. Should be stable, but doesn't have to be.
For latest stable and tested version, use latest
instead.
Experimental version for developers. May not work at all. Do not use if you don't know what you do.
docker run -d --name redis zeroteampro/redis
# Alternative regsitry
docker run -d --name redis registry.zero-team.pro/redis
docker run -d --name redis -v /opt/project/redis:/data zeroteampro/redis
docker run -d --name redis zeroteampro/redis:<version>
docker run -d --name redis -p 6379:6379 zeroteampro/redis
docker run -d --name redis -e REDIS_PASSWORD=verySecurePassword zeroteampro/redis
Adds requirepass verySecurePassword
to default redis.conf
docker run -d --name redis -e REDIS_TLS_ON=true -v /path/to/certs/:/certs zeroteampro/redis
docker run -d --name redis -e REDIS_TLS_ON=true -e REDIS_TLS_GEN=true -v /path/to/certs/:/certs zeroteampro/redis
New certificates will be generated in the certs
directory.
docker run -d --name redis -v /path/to/redis.conf:/app/redis.custom.conf zeroteampro/redis
docker run -d --name redis -v /path/to/redis.conf:/app/redis.conf zeroteampro/redis
Note! Some environment variables can enrich /app/redis.conf
. Do not use the same keys in your redis.conf
and environment variables (list below).
env:
REDIS_PASSWORD=somePassword
redis.conf new line:
requirepass somePassword
env:
REDIS_MAX_MEMORY=2gb
redis.conf new line:
maxmemory 2gb
env:
REDIS_SAVE="60 1"
redis.conf new line:
save 60 1
Log level notice
using by default.
env:
REDIS_LOG_LEVEL=debug
redis.conf new line:
loglevel debug
env:
REDIS_TLS_ON=true
redis.conf new lines:
port 0
tls-port 6379
tls-cert-file /certs/server.crt
tls-key-file /certs/server.key
tls-ca-cert-file /certs/ca.crt
tls-dh-params-file /certs/redis.dh
env:
REDIS_TLS_GEN=true
Generates new certificates in /certs. Do not use autogenerated certificates in production.
FROM zeroteampro/redis[:version]
COPY redis.conf /app/redis.conf
# Optional change CMD
# Default: #CMD ["/app/start-redis.sh"]
# The script copies /app/redis.conf to /usr/local/etc/redis/redis.conf,
# enriches it with environment variables, and
# runs redis-server with config /usr/local/etc/redis/redis.conf
CMD ["/app/start-redis.sh"] # Default for this image
# Change config to yours and ignore invironment variables
# NOTE! default CMD script will use your /app/redis.conf anyway,
# but alsa enriches it with environment variables.
# Using this custom CMD ignores all environment variables
# described above.
CMD ["redis-server", "/app/redis.conf"]