-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
36 lines (27 loc) · 1.05 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Ubuntu Redis.
FROM ubuntu:14.04
MAINTAINER Thomas Quintana <[email protected]>
# Add the latest stable redis ppa.
RUN apt-get update && apt-get install -y software-properties-common
RUN add-apt-repository ppa:chris-lea/redis-server
# Install.
RUN apt-get update && apt-get install -y python python-dev python-pip redis-server
RUN pip install Jinja2
# Copy template files into the container.
RUN mkdir /usr/share/redis
ADD conf/redis.conf.template /usr/share/redis/redis.conf.template
ADD conf/sentinel.conf.template /usr/share/redis/sentinel.conf.template
# Update sysctl.conf.
RUN echo "vm.overcommit_memory=1" >> /etc/sysctl.conf
# Copy and register the sentinel sysv script.
ADD sysv/sentinel-server /etc/init.d/sentinel-server
RUN chmod +x /etc/init.d/sentinel-server
RUN update-rc.d -f sentinel-server defaults
# Copy the start-redis script into the container.
ADD bin/start-redis /usr/bin/start-redis
RUN chmod +x /usr/bin/start-redis
# Open the container up to the world.
EXPOSE 6379/tcp
EXPOSE 26379/tcp
# Start the redis cluster.
CMD start-redis