Skip to content

Commit

Permalink
enhance Dockerfile to generate less images (#907)
Browse files Browse the repository at this point in the history
* enhance Dockerfile to generate less images

* enhance Dockerfile: enable-debug by default, yum install cmake3, remove ed dependencies

* use cmake by default and remove useless ENV
  • Loading branch information
Yandong Yao authored Jul 6, 2016
1 parent 2f10abe commit 2460cbb
Showing 1 changed file with 38 additions and 51 deletions.
89 changes: 38 additions & 51 deletions docker/base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,47 +1,36 @@
FROM centos:6

RUN yum -y update
RUN yum -y groupinstall "Development tools"
RUN yum -y install ed
RUN yum -y install readline-devel
RUN yum -y install zlib-devel
RUN yum -y install curl-devel
RUN yum -y install bzip2-devel
RUN yum -y install python-devel
RUN yum -y install apr-devel
RUN yum -y install libevent-devel
RUN yum -y install openssl-libs openssl-devel
RUN yum -y install libyaml libyaml-devel
RUN yum -y install epel-release
RUN yum -y install htop
RUN yum -y install ccache
RUN yum -y install libffi-devel
RUN yum -y install iproute
RUN yum -y install net-tools
RUN yum -y install openssh-server
RUN yum -y install perl-devel
RUN yum -y install perl-CPAN
RUN yum -y install perl-ExtUtils-Embed
RUN yum -y install libxml2-devel

ADD https://bootstrap.pypa.io/get-pip.py /
RUN python /get-pip.py
RUN pip install psutil lockfile paramiko setuptools epydoc
RUN rm /get-pip.py

# Misc
RUN yum -y install vim mc psmisc

# cmake 3.0
WORKDIR /root

ADD http://www.cmake.org/files/v3.0/cmake-3.0.0.tar.gz ./
RUN tar -zxvf cmake-3.0.0.tar.gz
WORKDIR cmake-3.0.0
RUN ./bootstrap
RUN make
RUN make install
ENV PATH=/usr/local/bin:$PATH
RUN yum -y update \
&& yum -y groupinstall "Development tools" \
&& yum -y install epel-release \
&& yum -y install apr-devel \
bzip2-devel \
ccache \
cmake \
curl-devel \
htop \
iproute \
libevent-devel \
libffi-devel \
libxml2-devel \
libyaml \
libyaml-devel \
mc \
net-tools \
openssl-devel \
openssl-libs \
openssh-server \
perl-CPAN \
perl-devel \
perl-ExtUtils-Embed \
psmisc \
python-devel \
readline-devel \
vim \
zlib-devel

RUN curl -SL https://bootstrap.pypa.io/get-pip.py | python \
&& pip install psutil lockfile paramiko setuptools epydoc

# compile GPDB

Expand All @@ -53,12 +42,10 @@ ADD ./docker/dotfiles/gpadmin.bashrc /home/gpadmin/.bashrc

WORKDIR gpdb

RUN ./configure --with-python --with-perl --enable-mapreduce --with-libxml --prefix=/usr/local/gpdb
RUN time make -j4
RUN make install

RUN ./docker/prep_for_ssh.bash

RUN chown -R gpadmin:gpadmin /home/gpadmin

RUN chmod u+s `which ping`
RUN ./configure --with-python --with-perl --enable-mapreduce \
--with-libxml --enable-debug --prefix=/usr/local/gpdb \
&& time make -j4 \
&& make install \
&& ./docker/prep_for_ssh.bash \
&& chown -R gpadmin:gpadmin /home/gpadmin \
&& chmod u+s `which ping`

0 comments on commit 2460cbb

Please sign in to comment.