redislabs/redis
Clustered in-memory database engine compatible with open source Redis by Redis Labs
1M+
7.8.4-66
, latest
7.8.2-60
,7.4.6-210
,7.2.4-118
,7.2.4-86
,7.2.4-72
,7.2.4-64
,7.2.4-52
,6.4.2-120
,6.4.2-61
,6.2.18-71
,6.2.12-82
,6.2.12-68
,6.2.10-129
,6.2.8-64
,6.2.4-54
,6.0.20-97
,6.0.20-95
,6.0.20-69
,6.0.12-58
,6.0.8-30
,6.0.6-39
,5.6.0-31
,5.4.14-34
,5.4.10-22
,5.4.6-17
,5.4.4-7
,5.4.2-27
,5.4.0-19
,5.2.2-24
,5.2.0-14
,5.0.2-30
,5.0.0-31
,4.5.0-51
Redis Enterprise Software is enterprise grade, distributed, in-memory NoSQL database server, fully compatible with open source Redis by Redis Labs. Redis Enterprise Software extends open source Redis and delivers stable high performance, zero-downtime linear scaling and high availability, with significant operational savings.
docker run -d --cap-add sys_resource --name rp -p 8443:8443 -p 9443:9443 -p 12000:12000 redislabs/redis
"rladmin"
tool and "create cluster"
commanddocker exec -d --privileged rp "/opt/redislabs/bin/rladmin" cluster create name cluster.local username cihan@redislabs.com password redislabs123
curl -k -u "cihan@redislabs.com:redislabs123" --request POST --url "https://localhost:9443/v1/bdbs" --header 'content-type: application/json' --data '{"name":"db1","type":"redis","memory_size":102400,"port":12000}'
Note: Redis Enterprise may take a few seconds to start depending on your HW. if you receive the following message: "503 Service Unavailable", wait a few more seconds and repeat step-2 and step3 again.
"redis-cli"
docker exec -it rp bash
# sudo /opt/redislabs/bin/redis-cli -p 12000
# 127.0.0.1:16653> set key1 123
# OK
# 127.0.0.1:16653> get key1
# "123"
#
You can run the Redis Enterprise Software linux based container on MacOS, various Linux and Windows based machines with Docker. Each Redis Enterprise Software container runs a cluster node. To get started, you can simply set up a one node cluster, create a database and connect your application to the database.
Note: Redis Enterprise Software Docker image works best when you provide a minimum of 2 cores and 6GB ram per container. You can find additional minimum hardware and software requirements for Redis Enterprise Software in the product documentation
Port 8443 is used for the administration UI and port 12000 is reserved for the Redis database that will be created in Step #5 below.
docker run -d --cap-add sys_resource --name rp -p 8443:8443 -p 12000:12000 redislabs/redis
https://localhost:8443
on the host machine to see the RS Web ConsoleNote: You may see a certificate error with your browser. Simply choose "continue to the website" to get to the setup screen.
"cluster.local"
If you don't have a license key, click "Next" to skip the license key screen to try the free version of the product. On the next screen, set up a cluster admin email and password.
In the new redis db screen, click the "show advanced option" link and provide a database name "database1", endpoint port number of "12000" and click "Activate" to create your database.
You now have a Redis database!
With the Redis database created, you are ready to connect to your database to store data. You can use redis-cli
or your favorite language with Redis client driver to talk to the new database. There is a python based example below.
redis-cli
:redis-cli
is a simple commandline tool to interact with a Redis instance. Use the following script to connect to the Redis Enterprise Software container, run redis-cli
connecting to port 12000 and store and retrieve a key.
docker exec -it rp bash
# sudo /opt/redislabs/bin/redis-cli -p 12000
# 127.0.0.1:16653> set key1 123
# OK
# 127.0.0.1:16653> get key1
# "123"
#
If you don't have python
or redis-py
(python library for connecting to Redis) on the host, you can run the redis-py container.
Following section assumes you already have python
and redis-py
configured on the host machine running the container.
You can find the instructions to install redis-py on the github page for redis-py.
Paste the following into a file named "redis_test.py"
import redis
r = redis.StrictRedis(host='localhost', port=12000, db=0)
print ("set key1 123")
print (r.set('key1', '123'))
print ("get key1")
print(r.get('key1'))
Run redis_test.py
application to connect to the database and store and retrieve a key.
python redis_test.py
The output should look like the following screen if the connection is successful.
# set key1 123
# True
# get key1
# b'123'
Supported Docker Versions:
Docker version 17.x or greater.
Getting Started
Detailed Documentation
docker pull redislabs/redis