1
0
mirror of https://git.cloudron.io/cloudron/syncthing-app synced 2025-09-24 13:57:34 +00:00

Added a proxy to provide ldap auth and make health check work

This commit is contained in:
Dennis Schwerdel
2017-05-08 07:56:55 +02:00
parent 5455b78124
commit b700f42b17
7 changed files with 94 additions and 12 deletions

View File

@@ -5,6 +5,29 @@ EXPOSE 8000
RUN apt-get update && apt-get -y install busybox
ENV NGINX_VERSION=1.12.0
ENV NGINX_LDAP_VERSION=b80942160417e95adbadb16adc41aaa19a6a00d9
# Build a custom nginx with ldap support
RUN apt-get remove -y nginx-full && apt-get autoremove -y && apt-get -y install libldap2-dev libpcre3-dev
RUN mkdir -p /tmp/nginx-ldap
WORKDIR /tmp/nginx-ldap
RUN wget "https://github.com/kvspb/nginx-auth-ldap/archive/${NGINX_LDAP_VERSION}.tar.gz" -O - \
| tar -xz -C /tmp/nginx-ldap --strip-components=1
RUN mkdir -p /tmp/nginx
WORKDIR /tmp/nginx
RUN wget "https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O - \
| tar -xz -C /tmp/nginx --strip-components=1
RUN ./configure \
--add-dynamic-module=/tmp/nginx-ldap \
--modules-path=/usr/local/nginx/modules \
--conf-path=/app/code/nginx.conf \
--pid-path=/run/nginx.pid \
--error-log-path=/run/nginx.error.log \
--build=cloudron-river
RUN make install
ENV VERSION 0.14.27
RUN mkdir -p /app/code \
@@ -13,6 +36,7 @@ RUN mkdir -p /app/code \
WORKDIR /app/code
ADD nginx.conf /app/code/nginx.conf
ADD config.xml /app/code/config.xml.default
ADD inittab /etc/inittab
ADD start.sh /app/code/start.sh