-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
42 lines (30 loc) · 1.14 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
FROM ubuntu:18.04
# Allow configuration of variable at build-time using --build-arg flag
ARG RETHINKDB_VERSION=2.3.7~0bionic
# Create an unprivileged user
RUN groupadd rethinkdb \
&& useradd -g rethinkdb rethinkdb --shell /bin/bash -m -d /home/rethinkdb
RUN \
sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \
apt-get update && \
apt-get -y upgrade && \
apt-get install -y build-essential && \
apt-get install -y software-properties-common && \
apt-get install -y byobu curl git htop man unzip vim wget python-pip && \
rm -rf /var/lib/apt/lists/*
RUN \
echo "deb https://download.rethinkdb.com/repository/ubuntu-`lsb_release -c -s` `lsb_release -c -s` main" | tee /etc/apt/sources.list.d/rethinkdb.list && \
wget -qO- https://download.rethinkdb.com/repository/raw/pubkey.gpg | apt-key add - && \
apt-get update && \
apt-get install -y rethinkdb
# Install python driver for rethinkdb
RUN pip install rethinkdb==2.3.0
# Create directories
RUN mkdir -p /data
RUN chown rethinkdb:rethinkdb -R /data
WORKDIR /data
USER rethinkdb
# process cluster webui
EXPOSE 28015 29015 8080
COPY entrypoint.sh /
CMD ["/entrypoint.sh"]