|
| 1 | +# Dockerfile for LemonLDAP::NG |
| 2 | +# Installation of trunk version of LL::NG |
| 3 | + |
| 4 | +# Start from Debian Jessie |
| 5 | +FROM debian:jessie |
| 6 | +MAINTAINER Xavier Guimard |
| 7 | +LABEL name="llng-nginx-trunk" \ |
| 8 | + version="v0.0.1" |
| 9 | + |
| 10 | +# Change SSO DOMAIN here |
| 11 | +ENV SSODOMAIN example.com |
| 12 | + |
| 13 | +COPY etc.supervisor.conf.d.supervisord.conf / |
| 14 | + |
| 15 | +# Update system and install LL::NG dependencies |
| 16 | +RUN apt-get -y update \ |
| 17 | + && apt-get -y upgrade \ |
| 18 | + && apt-get -y install nginx-extras supervisor libapache-session-perl libnet-ldap-perl \ |
| 19 | + libcache-cache-perl libdbi-perl perl-modules libwww-perl libcache-cache-perl \ |
| 20 | + libxml-simple-perl libsoap-lite-perl libhtml-template-perl \ |
| 21 | + libregexp-assemble-perl libjs-jquery libxml-libxml-perl libcrypt-rijndael-perl \ |
| 22 | + libio-string-perl libxml-libxslt-perl libconfig-inifiles-perl libjson-perl \ |
| 23 | + libstring-random-perl libemail-date-format-perl libmime-lite-perl \ |
| 24 | + libcrypt-openssl-rsa-perl libdigest-hmac-perl libclone-perl libauthen-sasl-perl \ |
| 25 | + libnet-cidr-lite-perl libcrypt-openssl-x509-perl libauthcas-perl libtest-pod-perl \ |
| 26 | + libtest-mockobject-perl libauthen-captcha-perl libnet-openid-consumer-perl \ |
| 27 | + libnet-openid-server-perl libunicode-string-perl libconvert-pem-perl \ |
| 28 | + libmouse-perl libplack-perl libglib-perl liblasso-perl yui-compressor dh-systemd \ |
| 29 | + vim subversion make devscripts libdbd-sqlite3-perl libemail-sender-perl \ |
| 30 | + libgd-securityimage-perl libimage-magick-perl \ |
| 31 | + && rm -rf /var/lib/apt/lists/* \ |
| 32 | + && echo "# Get trunk version of LL::NG" \ |
| 33 | + && cd /root \ |
| 34 | + && svn co svn://svn.forge.objectweb.org/svnroot/lemonldap/trunk lemonldap \ |
| 35 | + && echo "# Install LL::NG" \ |
| 36 | + && cd lemonldap \ |
| 37 | + && make debian-install-for-nginx |
| 38 | + && rm -rf /tmp/*lemonldap* /root/lemonldap/* \ |
| 39 | + && mv /etc.supervisor.conf.d.supervisord.conf /etc/supervisor/conf.d/supervisord.conf \ |
| 40 | + && echo "# Change SSO Domain" \ |
| 41 | + && sed -i "s/example\.com/${SSODOMAIN}/g" /etc/lemonldap-ng/* /var/lib/lemonldap-ng/conf/lmConf-1.js /var/lib/lemonldap-ng/test/index.pl \ |
| 42 | + && echo "# Set debug mode" \ |
| 43 | + && sed -i "s/logLevel\s*=\s*warn/logLevel = debug/" /etc/lemonldap-ng/lemonldap-ng.ini \ |
| 44 | + && echo "# Enable sites" \ |
| 45 | + && cd /etc/nginx/sites-enabled \ |
| 46 | + && ln -s ../sites-available/portal-nginx.conf \ |
| 47 | + && ln -s ../sites-available/manager-nginx.conf \ |
| 48 | + && ln -s ../sites-available/handler-nginx.conf \ |
| 49 | + && ln -s ../sites-available/test-nginx.conf \ |
| 50 | + && echo "# Enable headers and custom logs" \ |
| 51 | + && perl -i -pe 's/#// if(/nginx-lua-headers/)' /etc/lemonldap-ng/test-nginx.conf \ |
| 52 | + && perl -i -pe 's/#// if(/access\.log/)' /etc/lemonldap-ng/handler-nginx.conf \ |
| 53 | + && echo "# No daemon" \ |
| 54 | + && echo "\ndaemon off;" >> /etc/nginx/nginx.conf |
| 55 | + |
| 56 | +EXPOSE 80 443 |
| 57 | +VOLUME ["/var/log/nginx", "/etc/apache2", "/etc/lemonldap-ng", "/var/lib/lemonldap-ng/conf", "/var/lib/lemonldap-ng/sessions", "/var/lib/lemonldap-ng/psessions"] |
| 58 | +ENTRYPOINT ["/usr/bin/supervisord"] |
0 commit comments