forked from francoisjehl/docker-vertica
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
80 lines (69 loc) · 2 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
80
FROM centos:centos7
MAINTAINER Francois Jehl <[email protected]>
# Environment Variables
ENV VERTICA_HOME /opt/vertica
ENV WITH_VMART false
ENV NODE_TYPE master
ENV CLUSTER_NODES localhost
ENV GDBSERVER_PORT 2159
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
RUN useradd -r -m -g verticadba dbadmin
USER dbadmin
RUN echo "export LANG=en_US.UTF-8" >> ~/.bash_profile
RUN echo "export TZ=/usr/share/zoneinfo/Etc/Universal" >> ~/.bash_profile
RUN mkdir ~/.ssh && cd ~/.ssh && ssh-keygen -t rsa -q -f id_rsa
RUN 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
RUN cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
RUN /usr/bin/ssh-keygen -A
# Vertica specific system requirements
RUN echo "session required pam_limits.so" >> /etc/pam.d/su
RUN echo "dbadmin - nofile 65536" >> /etc/security/limits.conf
RUN echo "dbadmin - nice 0" >> /etc/security/limits.conf
#SupervisorD configuration
COPY sshd.sv.conf /etc/supervisor/conf.d/
COPY ntpd.sv.conf /etc/supervisor/conf.d/
COPY verticad.sv.conf /etc/supervisor/conf.d/
COPY 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"]