Public Repository

Last pushed: 2 years ago
Short Description
nginx-flying is a customized nginx build from offical source with three amazing modules.
Full Description

nginx-flying
nginx-flying is a customized nginx build from offical source with three amazing modules.
nginx-module-vts
Nginx virtual host traffic status module. README.md
ngx_dynamic_upstream
ngx_dynamic_upstream is the module for operating upstreams dynamically with HTTP APIs
such as ngx_http_upstream_conf.
nginx-statsd
An nginx module for sending statistics to statsd. README.md

#cat Dockerfile

FROM debian:jessie
MAINTAINER Arkii "sqy6@163.com"
ENV NGINX_VERSION 1.9.9

RUN echo 'Asia/Shanghai' > /etc/timezone && \
    /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    groupadd -g 396 nginx && \
    useradd --no-create-home nginx -u 396 -g 396 -M -c 'Nginx web server' -s /sbin/nologin -d /var/lib/nginx && \
    mkdir -p /var/log/nginx /var/lib/nginx /var/cache/nginx /usr/share/nginx && \
    chown -R nginx:nginx /var/log/nginx /var/lib/nginx /var/cache/nginx && \
    ln -sf /dev/stdout /var/log/nginx/access.log && \
    ln -sf /dev/stderr /var/log/nginx/error.log && \
    echo 'deb http://mirrors.aliyun.com/debian/ jessie main non-free contrib' >/etc/apt/sources.list && \
    echo 'deb http://mirrors.aliyun.com/debian/ jessie-proposed-updates main non-free contrib' >>/etc/apt/sources.list && \
    echo 'deb-src http://mirrors.aliyun.com/debian/ jessie main non-free contrib' >>/etc/apt/sources.list && \
    echo 'deb-src http://mirrors.aliyun.com/debian/ jessie-proposed-updates main non-free contrib' >>/etc/apt/sources.list && \
    apt-get update && \
    apt-get -y --no-install-suggests --no-install-recommends install \
    wget unzip make gcc perl libc-bin libzip-dev libssl-dev libgeoip1 \
    libperl5.20 libperl-dev libssl1.0.0 libxml2 libxslt1.1 \
    libxml2-dev libxslt1-dev libgd-dev libgeoip-dev \
    libgd2-xpm-dev libpcre++0 libpcre++-dev \
    lua5.1 liblua5.1-0 liblua5.1-0-dev

RUN mkdir /tmp/build && cd /tmp/build && \
    wget --no-check-certificate -O nginx-statsd.zip \
    https://github.com/arkii/nginx-statsd/archive/master.zip && \
    unzip nginx-statsd.zip && \
    wget --no-check-certificate -O ngx_dynamic_upstream.zip \
    https://github.com/arkii/ngx_dynamic_upstream/archive/master.zip && \
    unzip ngx_dynamic_upstream.zip && \
    wget --no-check-certificate -O nginx-module-vts.zip \
    https://github.com/arkii/nginx-module-vts/archive/master.zip && \
    unzip nginx-module-vts.zip && \
    wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \
    tar xf nginx-${NGINX_VERSION}.tar.gz && cd nginx-${NGINX_VERSION} && \

    ./configure \
    --prefix=/etc/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.pid \
    --lock-path=/var/run/nginx.lock \
    --http-client-body-temp-path=/var/cache/nginx/client_temp \
    --http-proxy-temp-path=/var/cache/nginx/proxy_temp \
    --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp \
    --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp \
    --http-scgi-temp-path=/var/cache/nginx/scgi_temp \
    --user=nginx \
    --group=nginx \
    --with-pcre \
    --with-pcre-jit \
    --with-file-aio \
    --with-ipv6 \
    --with-http_ssl_module \
    --with-http_v2_module \
    --with-http_realip_module \
    --with-http_addition_module \
    --with-http_xslt_module \
    --with-http_image_filter_module \
    --with-http_geoip_module \
    --with-http_sub_module \
    --with-http_dav_module \
    --with-http_flv_module \
    --with-http_mp4_module \
    --with-http_gunzip_module \
    --with-http_gzip_static_module \
    --with-http_auth_request_module \
    --with-http_random_index_module \
    --with-http_secure_link_module \
    --with-http_degradation_module \
    --with-http_slice_module \
    --with-http_stub_status_module \
    --with-http_perl_module \
    --with-mail \
    --with-mail_ssl_module \
    --with-stream \
    --with-stream_ssl_module \
    --add-module=../nginx-statsd-master \
    --add-module=../nginx-module-vts-master \
    --add-module=../ngx_dynamic_upstream-master && \

    make && make install

RUN apt-get remove -y gcc wget make unzip && \
       rm -rf /tmp/build /var/lib/apt/lists/*

EXPOSE 80 443 8000 8080
ENTRYPOINT ["nginx"]
CMD ["-g", "daemon off;"]
Docker Pull Command
Owner
arkii