dockerfile的一些语法

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
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值