redis / docker-library-redis

Docker Official Image packaging for Redis
http://redis.io
BSD 3-Clause "New" or "Revised" License
1.11k stars 560 forks source link

Is there a way to turn on clustered mode? #395

Closed craigpastro closed 3 months ago

craigpastro commented 3 months ago

I want to use a Redis test container with clustered mode on to test my service, but I haven't found any nice way to do this. Do you know of any?

Unlike the redis/redis-stack image, this image does not seem to use the REDIS_ARGS environment variable. I suppose if it did, I could do something like:

docker run --rm --name redis -e REDIS_ARGS="--cluster-enabled yes" redis

Anyway, I appreciate any help. Thank you!

yosifkit commented 3 months ago

Args to redis-server can just be passed in on the docker command line (anything after the image):

$ docker run --rm --name redis redis --cluster-enabled yes
tianon commented 3 months ago

Also, duplicate of https://github.com/docker-library/redis/issues/30 :sweat_smile:

craigpastro commented 3 months ago

Thanks @yosifkit! That's very helpful to know.