-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (36 loc) · 1.59 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
37
38
39
40
41
42
43
44
45
46
47
FROM phusion/baseimage:0.9.16
MAINTAINER Rob Genova [email protected]
# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]
# Environmental variables
ENV RIAK_VERSION 2.1.1-1
# Install Java 7
RUN sed -i.bak 's/main$/main universe/' /etc/apt/sources.list
RUN apt-get update -qq && apt-get install -y software-properties-common && \
apt-add-repository ppa:webupd8team/java -y && apt-get update -qq && \
echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \
apt-get install -y oracle-java7-installer
# Install Riak
RUN curl https://packagecloud.io/install/repositories/basho/riak/script.deb.sh | bash
RUN apt-get install -y riak=${RIAK_VERSION}
# Add run script
COPY scripts/run /etc/service/riak/run
RUN chmod 755 /etc/service/riak/run
## Set configs
RUN sed -i.bak 's/listener.http.internal = 127.0.0.1/listener.http.internal = 0.0.0.0/' /etc/riak/riak.conf && \
sed -i.bak 's/listener.protobuf.internal = 127.0.0.1/listener.protobuf.internal = 0.0.0.0/' /etc/riak/riak.conf && \
echo "erlang.distribution.port_range.minimum = 6000" >> /etc/riak/riak.conf && \
echo "erlang.distribution.port_range.maximum = 7999" >> /etc/riak/riak.conf && \
echo "search = on" >> /etc/riak/riak.conf
# Expose ports
## protocol buffers: 8087
## HTTP: 8098
## EPMD: 4369
## Erlang internode communication: 6000-7999
## Handoff: 8099
## Search: 8985, 8093
EXPOSE 8087 8098 4369 6000-7999 8099 8985 8093
VOLUME /var/lib/riak
VOLUME /var/log/riak
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*