1
0
Fork 0
mirror of https://gitlab.easter-eggs.com/ee/ldapsaisie.git synced 2024-12-24 09:23:47 +01:00
ldapsaisie/docker/Dockerfile

39 lines
1.9 KiB
Text
Raw Normal View History

2022-06-08 14:24:35 +02:00
FROM debian:11
# Update/upgrade
RUN apt-get update
RUN apt-get upgrade -y
# Install LdapSaisie APT repository
RUN apt-get install -y --force-yes wget gnupg lsb-release
2022-06-08 14:24:35 +02:00
RUN wget -O - http://ldapsaisie.org/debian/ldapsaisie.gpg.key | apt-key add -
RUN echo "deb http://ldapsaisie.org/debian $( lsb_release -c -s ) main" > /etc/apt/sources.list.d/ldapsaisie.list
2022-06-08 14:24:35 +02:00
RUN apt-get update
# Install dependencies
RUN DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt-get install -y git slapd apache2 php-ldap libapache2-mod-php php-cli smarty3 php-net-ldap2 php-net-ftp php-mail php-mail-mime php-console-table ldapvi locales sed bash-completion liquidprompt vim curl jq iproute2 net-tools composer php-cas php-zxcvbn php-phpseclib php-zip
2022-06-08 14:24:35 +02:00
# Add fr_FR* locales
RUN sed -i 's/^# fr_FR/fr_FR/' /etc/locale.gen
RUN locale-gen
# Clone sources
RUN git clone https://gitlab.easter-eggs.com/ee/ldapsaisie.git /var/www/ldapsaisie
# Fix www-data permission on temporary directory
RUN chown www-data: -R /var/www/ldapsaisie/src/tmp/
# Configure slapd and load lsexample directory
RUN killall slapd || echo slapd is not running
RUN /var/www/ldapsaisie/lsexample/restore_lsexample -v
# Configure and enable ldapsaisie VirtualHost (as default)
RUN a2dissite 000-default
COPY apache2.conf /etc/apache2/sites-available/ldapsaisie.conf
RUN a2ensite ldapsaisie
RUN a2enmod rewrite
RUN service apache2 restart
# Install ldapsaisie binary (with its bash-completion config)
RUN ln -s /var/www/ldapsaisie/src/bin/ldapsaisie.php /usr/local/sbin/ldapsaisie
RUN ln -s /var/www/ldapsaisie/debian/ldapsaisie.bash-completion /usr/share/bash-completion/completions/ldapsaisie
2022-06-17 12:40:08 +02:00
# Install vimrc.local file
COPY vimrc.local /etc/vim/vimrc.local
2022-06-08 14:24:35 +02:00
# Install entrypoint
COPY bashrc /root/.bashrc
COPY entrypoint.sh /usr/local/sbin/entrypoint.sh
RUN echo "ldapsaisie-dev" > /etc/hostname
ENTRYPOINT /usr/local/sbin/entrypoint.sh
EXPOSE 80 389