-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathDockerfile
79 lines (67 loc) · 2.02 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
FROM centos:centos7
MAINTAINER Francois Jehl <[email protected]>
# Environment Variables
ENV VERTICA_HOME=/opt/vertica \
WITH_VMART=false \
NODE_TYPE=master \
CLUSTER_NODES=localhost \
GDBSERVER_PORT=2159 \
ENABLE_WATCHDOG=false
ARG ENABLE_GDB_DEBUG=true
RUN localedef -i en_US -f UTF-8 en_US.UTF-8
# Yum dependencies
RUN yum install -y \
which \
openssh-server \
openssh-clients \
openssl \
iproute \
dialog \
gdb \
gdb-gdbserver \
sysstat \
mcelog \
bc \
ntp \
gcc-c++ \
cmake \
python-setuptools
# Debug infos for GDB
RUN if [ ${ENABLE_GDB_DEBUG} = 'true' ]; then debuginfo-install -y \
expat \
glibc \
keyutils-libs \
libcom_err \
libgcc \
libstdc++ \
zlib \
; fi
# Install supervisor
RUN easy_install supervisor
# DBAdmin account configuration
RUN groupadd -r verticadba \
&& useradd -r -m -g verticadba dbadmin
USER dbadmin
RUN echo "export LANG=en_US.UTF-8" >> ~/.bash_profile \
&& echo "export TZ=/usr/share/zoneinfo/Etc/Universal" >> ~/.bash_profile \
&& mkdir ~/.ssh && cd ~/.ssh && ssh-keygen -t rsa -q -f id_rsa \
&& cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
# Root SSH configuration
USER root
RUN mkdir ~/.ssh && cd ~/.ssh && ssh-keygen -t rsa -q -f id_rsa \
&& cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys \
&& /usr/bin/ssh-keygen -A
# Vertica specific system requirements
RUN echo "session required pam_limits.so" >> /etc/pam.d/su \
&& echo "dbadmin - nofile 65536" >> /etc/security/limits.conf \
&& echo "dbadmin - nice 0" >> /etc/security/limits.conf
#SupervisorD configuration
COPY sshd.sv.conf ntpd.sv.conf verticad.sv.conf gdbserverd.sv.conf /etc/supervisor/conf.d/
COPY supervisord.conf /etc/supervisord.conf
# Vertica and GDB daemon-like startup scripts
COPY verticad /usr/local/bin/verticad
COPY gdbserverd /usr/local/bin/gdbserverd
EXPOSE 5433
EXPOSE ${GDBSERVER_PORT}
#Starting supervisor
CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]