增加1.9.9构建
This commit is contained in:
parent
337051efb0
commit
68649b13b8
27
nginx/1.9.9/Dockerfile
Normal file
27
nginx/1.9.9/Dockerfile
Normal file
@ -0,0 +1,27 @@
|
||||
FROM centos:7
|
||||
|
||||
MAINTAINER Yang <yangyufans@qq.com>
|
||||
|
||||
ENV NGINX_VERSION=1.9.9
|
||||
|
||||
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
|
||||
|
||||
CMD ["/start.sh"]
|
||||
8
nginx/1.9.9/start.sh
Normal file
8
nginx/1.9.9/start.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! -e /nginx/conf/nginx.conf ]; then
|
||||
cp /usr/local/nginx/conf/nginx.conf /nginx/conf
|
||||
sed -i "s/mime.types/\/usr\/local\/nginx\/conf\/mime.types/" /nginx/conf/nginx.conf
|
||||
fi
|
||||
|
||||
/usr/local/nginx/sbin/nginx -c /nginx/conf/nginx.conf -g 'daemon off;'
|
||||
Loading…
Reference in New Issue
Block a user