1FROM centos:6.6 2 3RUN yum install -y git \ 4 tar \ 5 wget \ 6 make \ 7 autoconf \ 8 curl-devel \ 9 unzip \ 10 automake \ 11 libtool \ 12 glibc-static.i686 \ 13 glibc-devel \ 14 glibc-devel.i686 15 16# Install Java 8 17RUN wget -q --no-cookies --no-check-certificate \ 18 --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.tar.gz" \ 19 -O - | tar xz -C /var/local 20ENV JAVA_HOME /var/local/jdk1.8.0_45 21ENV PATH $JAVA_HOME/bin:$PATH 22 23# Install Maven 24RUN wget -q http://apache.cs.utah.edu/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz -O - | \ 25 tar xz -C /var/local 26ENV PATH /var/local/apache-maven-3.3.3/bin:$PATH 27 28# Install GCC 4.7 to support -static-libstdc++ 29RUN wget http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo -P /etc/yum.repos.d 30RUN bash -c 'echo "enabled=1" >> /etc/yum.repos.d/devtools-1.1.repo' 31RUN bash -c "sed -e 's/\$basearch/i386/g' /etc/yum.repos.d/devtools-1.1.repo > /etc/yum.repos.d/devtools-i386-1.1.repo" 32RUN sed -e 's/testing-/testing-i386-/g' -i /etc/yum.repos.d/devtools-i386-1.1.repo 33RUN yum install -y devtoolset-1.1 \ 34 devtoolset-1.1-libstdc++-devel \ 35 devtoolset-1.1-libstdc++-devel.i686 36 37RUN git clone --depth 1 https://github.com/google/protobuf.git 38 39# Start in devtoolset environment that uses GCC 4.7 40CMD ["scl", "enable", "devtoolset-1.1", "bash"] 41