Dockerfile 1.0 KB

12345678910111213141516171819202122
  1. FROM centos:latest
  2. MAINTAINER MAINTAINER The Condenast Web Server <liang.cheng@condenast.com.cn>
  3. # install main packages:
  4. RUN yum -y install wget openssl-devel gcc gcc-c++ make pcre-devel pcre; yum clean all
  5. RUN cd /root \
  6. && wget http://tengine.taobao.org/download/tengine-2.1.2.tar.gz \
  7. && tar xzf tengine-2.1.2.tar.gz \
  8. && cd /root/tengine-2.1.2 \
  9. && ./configure --prefix=/etc/nginx/ --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --pid-path=/tmp/nginx.pid --lock-path=/tmp/nginx.lock --user=nginx --group=nginx --with-poll_module --with-http_realip_module --with-http_sub_module --with-http_ssl_module --with-http_flv_module --with-http_mp4_module --with-http_stub_status_module --with-http_gzip_static_module --with-http_concat_module \
  10. && make \
  11. && make install \
  12. && rm -rf /root/tengine*
  13. # copy cfg files:
  14. ADD ./conf/nginx/nginx.conf /etc/nginx/nginx.conf
  15. RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
  16. && chmod +x /etc/rc.d/rc.local
  17. EXPOSE 80
  18. CMD ["/usr/sbin/nginx","-c","/etc/nginx/nginx.conf"]