FROM centos:7
MAINTAINER yuyongxr yuyongxr@gmail.com
LABEL Discription="centos7+nginx1.15.10" version="1.0"
WORKDIR /tmp
RUN yum install -y wget
RUN wget http://nginx.org/download/nginx-1.15.10.tar.gz
RUN tar -zxvf nginx-1.15.10.tar.gz
WORKDIR /tmp/nginx-1.15.10
#安装nginx所依赖的包
RUN yum -y install gcc-c++
RUN yum -y install pcre pcre-devel
RUN yum -y install zlib zlib-devel
RUN yum -y install openssl openssl-devel libssl-dev
RUN ./configure
RUN make
RUN make install
RUN rm -rf /tmp/*
WORKDIR /usr/local/nginx/sbin
EXPOSE 80
CMD ["/usr/local/nginx/sbin/nginx","-g","daemon off;"]