FROM centos:centos7
MAINTAINER luomei
# Install prepare infrastructure
RUN yum -y update && \
yum -y install wget && \
yum -y install tar
RUN yum -y install bzip2
RUN localedef -i zh_CN -f UTF-8 zh_CN.UTF-8
ENV LANG zh_CN.UTF-8
ENV LANGUAGE zh_CN:zh
ENV LC_ALL zh_CN.UTF-8
RUN yum -y install net-tools
RUN yum -y install less
#RUN yum -y install java-1.8.0-openjdk-devel.x86_64 && yum install -y java-1.8.0#-openjdk-debuginfo --enablerepo=*debug*
#RUN echo "root:Docker!" | chpasswd
# Create tomcat user
#RUN groupadd -r admin && \
# useradd -g admin -s /sbin/nologin -c "Tomcat user" admin
WORKDIR /home/admin
#install c++
RUN yum -y install gcc gcc-c++
RUN yum -y install make
RUN yum -y install cmake
RUN yum -y install gdb
#new package and copy all to it
RUN mkdir /package
WORKDIR /package
ADD . .
#install boost,used in mq
WORKDIR /package
RUN bzip2 -d boost_1_62_0.tar.bz2
RUN tar -xvf boost_1_62_0.tar
WORKDIR /package/boost_1_62_0
RUN ./bootstrap.sh
RUN ./b2 link=shared runtime-link=shared || echo "errors in make boost"
RUN ./b2 install || echo "errors in install boost"
RUN ldconfig -v|grep libboost || echo "errors in show boost lib"
#install oss
RUN yum -y install curl-devel apr-devel apr-util-devel
WORKDIR /package
RUN tar -xvf mxml-2.9.tar
WORKDIR /package/mxml-2.9/
RUN ls
RUN pwd
RUN ./configure
RUN make
RUN make install
WORKDIR /package
RUN tar -xvf aliyun-oss-c-sdk-3.5.0.tar
WORKDIR /package/aliyun-oss-c-sdk-3.5.0
RUN cmake .
RUN make
RUN make install
#install mq
WORKDIR /package
RUN yum -y install zip unzip
RUN unzip aliyun-mq-linux-cpp-sdk.zip || echo "error in install mq"
#EXPOSE 8080
#EXPOSE 8009
ENTRYPOINT tail -f /etc/passwd