This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
56 lines (51 loc) · 1.96 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
48
49
50
51
52
53
54
55
56
FROM ubuntu:16.04
ARG RIAKKV_VERSION
ARG ULIMIT_FD
ENV RIAKKV_VERSION=${RIAKKV_VERSION:-2.2.0}
ENV ULIMIT_FD=${ULIMIT_FD:-262144}
## -----------------------------------------------------------------------------
## Installing dependencies
## -----------------------------------------------------------------------------
ENV DEBIAN_FRONTEND noninteractive
RUN set -xe \
&& apt-get update \
&& apt-get -y --no-install-recommends install \
software-properties-common \
apt-transport-https \
ca-certificates \
lsb-release \
curl \
&& apt-get update \
&& apt-get -y --no-install-recommends install \
rsyslog \
vim-nox \
sudo \
less \
make \
g++ \
git \
jq
## -----------------------------------------------------------------------------
## Installing Riak KV
## -----------------------------------------------------------------------------
RUN set -xe \
&& add-apt-repository -s -y "deb https://packagecloud.io/basho/riak/ubuntu/ $(lsb_release -sc) main" \
&& curl -fSL https://packagecloud.io/gpg.key 2>&1 | apt-key add -- \
&& apt-get update \
&& apt-get -y --no-install-recommends install \
riak=${RIAKKV_VERSION}-1
## -----------------------------------------------------------------------------
## Configuring Riak KV
## -----------------------------------------------------------------------------
RUN set -xe \
&& echo "ulimit -n ${ULIMIT_FD}" >> /etc/default/riak \
&& perl -pi -e 's/(listener.http.internal = )127\.0\.0\.1/${1}0.0.0.0/' /etc/riak/riak.conf \
&& perl -pi -e 's/(listener.protobuf.internal = )127\.0\.0\.1/${1}0.0.0.0/' /etc/riak/riak.conf \
&& perl -pi -e 's/(?:(log.syslog = ).*)/${1}on/' /etc/riak/riak.conf
## -----------------------------------------------------------------------------
## Enabling Riak Search
## -----------------------------------------------------------------------------
RUN set -xe \
&& apt-get -y --no-install-recommends install \
default-jre-headless \
&& perl -pi -e 's/(search = )off/${1}on/' /etc/riak/riak.conf