Docker: Add stuff to build old Debian versions images

This commit is contained in:
Benjamin Renard 2023-01-03 15:35:56 +01:00
parent d80c15acc1
commit 89a13d86c6
3 changed files with 49 additions and 5 deletions

View file

@ -3,12 +3,12 @@ FROM debian:11
RUN apt-get update RUN apt-get update
RUN apt-get upgrade -y RUN apt-get upgrade -y
# Install LdapSaisie APT repository # Install LdapSaisie APT repository
RUN apt-get install -y wget gnupg RUN apt-get install -y --force-yes wget gnupg lsb-release
RUN wget -O - http://ldapsaisie.org/debian/ldapsaisie.gpg.key | apt-key add - RUN wget -O - http://ldapsaisie.org/debian/ldapsaisie.gpg.key | apt-key add -
COPY apt.list /etc/apt/sources.list.d/ldapsaisie.list RUN echo "deb http://ldapsaisie.org/debian $( lsb_release -c -s ) main" > /etc/apt/sources.list.d/ldapsaisie.list
RUN apt-get update RUN apt-get update
# Install dependencies # 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 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
# Add fr_FR* locales # Add fr_FR* locales
RUN sed -i 's/^# fr_FR/fr_FR/' /etc/locale.gen RUN sed -i 's/^# fr_FR/fr_FR/' /etc/locale.gen
RUN locale-gen RUN locale-gen

41
docker/Dockerfile-jessie Normal file
View file

@ -0,0 +1,41 @@
FROM debian:8
# 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
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
RUN apt-get update
# Install dependencies
RUN DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt-get install -y --force-yes git slapd apache2 php5-ldap libapache2-mod-php5 php5-cli smarty3 php-net-ldap2 php-net-ftp php-mail php-mail-mime php-console-table ldapvi locales sed bash-completion vim curl jq iproute2 net-tools php-cas php-zxcvbn
# Install composer
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
RUN php composer-setup.php && mv composer.phar /usr/local/bin/composer && chmod 755 /usr/local/bin/composer && rm -f composer-setup.php
# 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
# Install vimrc.local file
COPY vimrc.local /etc/vim/vimrc.local
# 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

View file

@ -3,5 +3,8 @@ HISTSIZE=1000
HISTFILESIZE=2000 HISTFILESIZE=2000
source /etc/bash_completion source /etc/bash_completion
if [ -x /usr/share/liquidprompt/liquidprompt ]
then
# Only load liquidprompt in interactive shells, not from a script or from scp # Only load liquidprompt in interactive shells, not from a script or from scp
echo $- | grep -q i 2>/dev/null && . /usr/share/liquidprompt/liquidprompt echo $- | grep -q i 2>/dev/null && . /usr/share/liquidprompt/liquidprompt
fi