Skip to content

Commit 231d402

Browse files
authored
Support for unstable docker (#1842)
1 parent bc3dbb4 commit 231d402

File tree

4 files changed

+33
-1
lines changed

4 files changed

+33
-1
lines changed

CONTRIBUTING.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ can execute docker and its various commands.
5757
- A master Redis node
5858
- A Redis replica node
5959
- Three sentinel Redis nodes
60-
- A multi-python docker, with your source code mounted in /data
60+
- A redis cluster
6161
- An stunnel docker, fronting the master Redis node
62+
- A Redis node, running unstable - the latest redis
6263

6364
The replica node, is a replica of the master node, using the
6465
[leader-follower replication](https://redis.io/topics/replication)

docker/base/Dockerfile.unstable

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# produces redisfab/redis-py:unstable
2+
FROM ubuntu:bionic as builder
3+
RUN apt-get update
4+
RUN apt-get upgrade -y
5+
RUN apt-get install -y build-essential git
6+
RUN mkdir /build
7+
WORKDIR /build
8+
RUN git clone https://github.com/redis/redis
9+
WORKDIR /build/redis
10+
RUN make
11+
12+
FROM ubuntu:bionic as runner
13+
COPY --from=builder /build/redis/src/redis-server /usr/bin/redis-server
14+
COPY --from=builder /build/redis/src/redis-cli /usr/bin/redis-cli
15+
COPY --from=builder /build/redis/src/redis-sentinel /usr/bin/redis-sentinel
16+
17+
EXPOSE 6379
18+
CMD ["redis-server", "/redis.conf"]

docker/unstable/redis.conf

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
port 6378
2+
protected-mode no
3+
save ""

tox.ini

+10
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(sock
3232
volumes =
3333
bind:rw:{toxinidir}/docker/replica/redis.conf:/redis.conf
3434

35+
[docker:unstable]
36+
name = unstable
37+
image = redisfab/redis-py:unstable-bionic
38+
ports =
39+
6378:6378/tcp
40+
healtcheck_cmd = python -c "import socket;print(True) if 0 == socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex(('127.0.0.1',6378)) else False"
41+
volumes =
42+
bind:rw:{toxinidir}/docker/unstable/redis.conf:/redis.conf
43+
3544

3645
[docker:sentinel_1]
3746
name = sentinel_1
@@ -108,6 +117,7 @@ deps =
108117
-r {toxinidir}/requirements.txt
109118
-r {toxinidir}/dev_requirements.txt
110119
docker =
120+
unstable
111121
master
112122
replica
113123
sentinel_1

0 commit comments

Comments
 (0)