-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (44 loc) · 1.48 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM debian:jessie
MAINTAINER Diogo Castro <[email protected]>
ENV NGINX_VERSION release-1.11.3
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \
&& apt-get update \
&& apt-get install -y \
ca-certificates \
git \
gcc \
make \
libpcre3-dev \
zlib1g-dev \
libldap2-dev \
libssl-dev \
wget
# See http://wiki.nginx.org/InstallOptions
RUN mkdir /var/log/nginx \
&& mkdir /etc/nginx \
&& cd ~ \
&& git clone https://github.com/kvspb/nginx-auth-ldap.git \
&& git clone https://github.com/aperezdc/ngx-fancyindex.git \
&& git clone https://github.com/nginx/nginx.git \
&& cd ~/nginx \
&& git checkout tags/${NGINX_VERSION} \
&& ./auto/configure \
--add-module=/root/nginx-auth-ldap \
--add-module=/root/ngx-fancyindex \
--with-http_ssl_module \
--with-debug \
--conf-path=/etc/nginx/nginx.conf \
--sbin-path=/usr/sbin/nginx \
--pid-path=/var/log/nginx/nginx.pid \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
&& make install \
&& cd .. \
&& rm -rf nginx-auth-ldap \
&& rm -rf ngx-fancyindex \
&& rm -rf nginx \
&& wget -O /tmp/dockerize.tar.gz https://github.com/jwilder/dockerize/releases/download/v0.0.4/dockerize-linux-amd64-v0.0.4.tar.gz \
&& tar -C /usr/local/bin -xzvf /tmp/dockerize.tar.gz \
&& rm -rf /tmp/dockerize.tar.gz
EXPOSE 80 443
CMD ["dockerize","-stdout","/var/log/nginx/access.log","-stderr","/var/log/nginx/error.log","/usr/sbin/nginx","-g","daemon off;"]