Reputation: 145
I have followed the tutorial and run:
docker run -p 6379:6379 --name redis-rejson redislabs/rejson:latest
But when I try to run redis-cli and then json.get, I got:
ERR unknown command 'JSON.SET'
MODULE LIST return nil. Can anyone guide me on how to run rejson with docker? Appreciate.
Upvotes: 5
Views: 8380
Reputation: 129
Your problem is that you are not loading the redis-json module. Solution is:
First stop redis server
brew services stop redis
Then, run server with loading the module
redis-server --loadmodule ./your_release_directory/librejson.dylib
Now you can redis-cli
in other terminal.
Upvotes: 3
Reputation: 145
I found the problems. I run local redis and it use port 6379 already. When I map rejson docker 6379:6379, it conflicts. . Use different local port for rejson to map with docker port, for example 7000:6379. Cheers
Upvotes: 3