docker/nginx/1.15.0/Dockerfile
2018-06-24 21:03:34 +08:00

27 lines
596 B
Docker

FROM centos:7
MAINTAINER Yang <yangyufans@qq.com>
ENV NGINX_VERSION=1.15.0
RUN yum install -y wget make gcc pcre-devel gzip zlib zlib-devel
RUN cd / && wget http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz \
&& tar -zxvf nginx-$NGINX_VERSION.tar.gz \
&& rm -rf nginx-$NGINX_VERSION.tar.gz \
&& cd nginx-$NGINX_VERSION \
&& ./configure --prefix=/usr/local/nginx \
&& make \
&& make install \
&& cd .. \
&& rm -rf nginx-$NGINX_VERSION
RUN mkdir -p /nginx/conf && mkdir /nginx/logs/ && mkdir /nginx/www
EXPOSE 80
COPY start.sh /
RUN chmod 777 /start.sh
ENTRYPOINT ["/start.sh"]