-
Notifications
You must be signed in to change notification settings - Fork 0
/
dockerfile0
44 lines (36 loc) · 1.94 KB
/
dockerfile0
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
# Greenplum Database (GPDB) "Single Node" Docker container
# Forked from https://github.com/kevinmtrowbridge/greenplumdb_singlenode_docker
FROM centos:6.6
MAINTAINER "A-Team"
ENV org_name_proxy http://xx.xxx.xxx.xxxx:8080
ENV archive greenplum-db-4.3.5.2-build-1-RHEL5-x86_64.bin
ENV installPath /usr/local/greenplum-db-4.3.5.2
RUN http_proxy=$org_name_proxy https_proxy=$org_name_proxy yum update -y &&\
http_proxy=$org_name_proxy https_proxy=$org_name_proxy yum install -y ed which tar sed openssh-server openssh-clients perl &&\
yum clean all &&\
echo '/usr/lib64/perl5/CORE/' > /etc/ld.so.conf.d/perl.conf &&\
ldconfig
# CUE GPADMIN USER
RUN groupadd -g 8000 gpadmin &&\
useradd -m -s /bin/bash -d /home/gpadmin -g gpadmin -u 8000 gpadmin &&\
mkdir -p /data/gpmaster /data/gpdata1 /data/gpdata2 &&\
chown -R gpadmin:gpadmin /data
# NECESSARY: key exchange with ourselves - needed by single-node greenplum
RUN service sshd start && ssh-keygen -t rsa -q -f /root/.ssh/id_rsa -P "" &&\
cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys &&\
ssh-keyscan -t rsa localhost >> /etc/ssh/ssh_known_hosts
# get the greenplum archive and extract it
RUN curl -o ${archive} http://xxxx_xxxx.auorg_name.corp/fs/greenplum/${archive} &&\
service sshd start &&\
mkdir -p $installPath &&\
tail -n +`awk '/^__END_HEADER__/ {print NR + 1; exit 0; }' "${archive}"` "${archive}" | tar zxf - -C ${installPath} &&\
if [ ! -e `dirname ${installPath}`/greenplum-db ]; then ln -s ./`basename ${installPath}` `dirname ${installPath}`/greenplum-db;fi &&\
sed -i "s,^GPHOME.*,GPHOME=${installPath}," ${installPath}/greenplum_path.sh &&\
chown gpadmin.gpadmin ${installPath} &&\
rm ${archive}
ENV GPHOME /usr/local/greenplum-db
WORKDIR /home/gpadmin
COPY bash/gpinit.sh /gpinit.sh
COPY bash/.gpadmin_bash_profile .bash_profile
COPY gpdb/hostlist_singlenode hostlist_singlenode
COPY gpdb/gpinitsystem_singlenode gpinitsystem_singlenode