FROM mycentos6:1.0
MAINTAINER Rex.chen rex.chen@aaa.com
LABEL Nginx=
"1.10.2"
RUN [
"groupadd"
,
"-r"
,
"nginx"
]
RUN [
"useradd"
,
"-r"
,
"-g"
,
"nginx"
,
"-s"
,
"/sbin/nologin"
,
"nginx"
]
ENV SOFT_DEST
/usr/local/src
ADD nginx
/nginx-1
.10.2.
tar
.gz $SOFT_DEST
ADD nginx
/openssl-1
.1.0c.
tar
.gz $SOFT_DEST
ADD nginx
/zlib-1
.2.11.
tar
.gz $SOFT_DEST
ADD nginx
/pcre-8
.39.
tar
.gz $SOFT_DEST
WORKDIR $SOFT_DEST
RUN [
"mkdir"
,
"/var/tmp/nginx"
,
"-p"
]
RUN [
"mkdir"
,
"/var/run/nginx"
,
"-p"
]
RUN [
"mkdir"
,
"/var/log/nginx"
,
"-p"
]
RUN [
"mkdir"
,
"/var/lock/nginx"
,
"-p"
]
RUN
cd
.
/nginx-1
.10.2 && .
/configure
\
--prefix=
/usr/nginx/
\
--sbin-path=
/usr/sbin/nginx
\
--conf-path=
/etc/nginx/nginx
.conf \
--error-log-path=
/var/log/nginx/error
.log \
--http-log-path=
/var/log/nginx/access
.log \
--pid-path=
/var/run/nginx/nginx
.pid \
--lock-path=
/var/lock/nginx/nginx
.lock \
--user=nginx --group=nginx \
--with-
file
-aio --with-threads \
--with-http_ssl_module \
--with-http_flv_module \
--with-http_stub_status_module \
--with-http_gzip_static_module \
--with-http_v2_module \
--with-http_realip_module \
--http-client-body-temp-path=
/var/tmp/nginx/client/
\
--http-proxy-temp-path=
/var/tmp/nginx/proxy/
\
--http-fastcgi-temp-path=
/var/tmp/nginx/fcgi/
\
--http-uwsgi-temp-path=
/var/tmp/nginx/uwsgi/
\
--http-scgi-temp-path=
/var/tmp/nginx/scgi/
\
--with-openssl=
/usr/local/src/openssl-1
.1.0c \
--with-zlib=
/usr/local/src/zlib-1
.2.11 \
--with-pcre=
/usr/local/src/pcre-8
.39 &&
make
&&
make
install
EXPOSE 80