You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-10Lines changed: 6 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,31 +2,27 @@
2
2
3
3
Docker image with redis built and installed from source.
4
4
5
+
The main usage for this container is to test redis cluster code. For example in https://github.com/Grokzen/redis-py-cluster repo.
6
+
5
7
The cluster is 6 redis instances running with 3 master & 3 slaves, one slave for each master. They run on ports 7000 to 7005.
6
8
7
9
It also contains 2 standalone instances that is not part of the cluster. They are running on port 7006 & 7007
8
10
9
11
It will allways build the latest commit in the 3.0 branch `https://github.com/antirez/redis/tree/3.0`
10
12
11
-
12
-
13
-
# Setup Docker
14
-
15
-
How to setup docker and start the cluster image.
16
-
17
-
Install `docker` on your system. 1.0 or higher is recommended. Instructions can be found at http://docs.docker.com/en/latest/installation/. It is also reccomended to add the current user to `docker` system group to remove the need to add sudo to each docker call.
13
+
This image requires `Docker` above version 1.0
18
14
19
15
20
16
21
17
# Usage
22
18
23
19
If you want to use `docker-compose (fig)` please read next section.
24
20
25
-
Download the latest build from docker hub with `docker pull grokzen/redis-cluster`
21
+
Either download the latest build from docker hub with `docker pull grokzen/redis-cluster`
26
22
27
-
To build the image run either `make build` or `make rebuild`. It will be built to the image name `grokzen/redis-cluster`.
23
+
Or to build the image, use either `make build` or `make rebuild`. It will be built to the image name `grokzen/redis-cluster`.
28
24
29
-
To start the image run`make run`. It will be started in the background. To gain access to the running image you can get a bash session by running `make bash`.
25
+
To start the image use`make run`. It will be started in the background. To gain access to the running image you can get a bash session by running `make bash`.
30
26
31
27
Test to connect to the cluster with `redis-cli -p 7000`. If you do not want to install a redis server on your host to get access to `redis-cli` you can run a `exec` command to run it inside the docker container. It can be done with `docker exec -it <ContainerID> /redis/src/redis-cli -p 7000` where `<ContainerID>` can be found inside the CID file at `/tmp/grokzen-redis-cluster.cid` or via `docker ps`.
0 commit comments