-
Notifications
You must be signed in to change notification settings - Fork 81
/
Dockerfile
58 lines (50 loc) · 1.58 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
51
52
53
54
55
56
57
58
FROM ubuntu:14.04
MAINTAINER Robert Northard, <robert.a.northard>
ENV NGINX_VERSION 1.8.0
ENV LDAP_PROTOCOL ldap
############## nginx setup ##############
RUN apt-get update \
&& apt-get install -y \
ca-certificates \
git \
gcc \
make \
libpcre3-dev \
zlib1g-dev \
libldap2-dev \
libssl-dev \
wget \
jq
# See http://wiki.nginx.org/InstallOptions
RUN mkdir /var/log/nginx \
&& mkdir -p /etc/nginx/sites-enabled \
&& mkdir -p /usr/share/nginx/html \
&& cd ~ \
&& git clone https://github.com/kvspb/nginx-auth-ldap.git \
&& git clone https://github.com/nginx/nginx.git \
&& cd nginx \
&& git checkout tags/release-${NGINX_VERSION} \
&& ./auto/configure \
--add-module=/root/nginx-auth-ldap \
--with-http_ssl_module \
--with-debug \
--conf-path=/etc/nginx/nginx.conf \
--sbin-path=/usr/sbin/nginx \
--pid-path=/var/run/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 nginx
COPY templates/nginx/nginx.init /etc/init.d/nginx
RUN chmod +x /etc/init.d/nginx
EXPOSE 80 443
# Adding base data
RUN mkdir -p /resources/
COPY resources/configuration/ /resources/configuration/
COPY resources/release_note/ /resources/release_note/
COPY resources/scripts/ /resources/scripts/
COPY templates/configuration/ /templates/configuration/
RUN chmod +x /resources/scripts/*
CMD ["/resources/scripts/entrypoint.sh"]