################################################
#Dockerfile to build Nginx Installed Containers#
#Based on CentOS                                      #
################################################
#Set the base image to CentOS
FROM centos
#File Author / Maintainer
MAINTAINER fansik shandingshangdeyu@hotmail.com

#Install necessary tools
RUN yum install -y pcre-devel wget net-tools gcc zlib zlib-devel make openssl-devel

#Install Nginx
ADD http://nginx.org/download/nginx-1.8.0.tar.gz .
RUN tar zxvf nginx-1.8.0.tar.gz
RUN mkdir -p /usr/local/nginx
RUN cd nginx-1.8.0 && ./configure --prefix=/usr/local/nginx && make && make install
RUN rm -fv /usr/local/nginx/conf/nginx.conf
COPY nginx.conf /usr/local/nginx/conf/nginx.conf

#Expose ports
EXPOSE 80

#Set the default command to execute
#when creating a new container
#CMD /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

相关文章:

  • 2022-02-08
  • 2021-12-19
  • 2022-12-23
  • 2022-02-13
  • 2022-12-23
  • 2021-07-28
  • 2022-12-23
  • 2022-01-18
猜你喜欢
  • 2021-07-25
  • 2022-12-23
  • 2021-10-18
  • 2022-12-23
  • 2021-05-16
  • 2021-10-04
  • 2022-12-23
相关资源
相似解决方案