forked from wheelybird/ldap-user-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (23 loc) · 1006 Bytes
/
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
FROM php:8-apache
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libldb-dev libldap2-dev libldap-common \
libfreetype6-dev \
libjpeg-dev \
libpng-dev && \
rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-configure gd --with-freetype && \
docker-php-ext-install -j$(nproc) gd && \
libdir=$(find /usr -name "libldap.so*" | sed -e 's/\/usr\///' -e 's/\/libldap.so//') && \
docker-php-ext-configure ldap --with-libdir=$libdir && \
docker-php-ext-install -j$(nproc) ldap
ADD https://github.com/PHPMailer/PHPMailer/archive/refs/tags/v6.3.0.tar.gz /tmp
RUN a2enmod rewrite ssl && a2dissite 000-default default-ssl
EXPOSE 80
EXPOSE 443
COPY www/ /opt/ldap_user_manager
RUN tar -xzf /tmp/v6.3.0.tar.gz -C /opt && mv /opt/PHPMailer-6.3.0 /opt/PHPMailer
COPY entrypoint /usr/local/bin/entrypoint
RUN chmod a+x /usr/local/bin/entrypoint && touch /etc/ldap/ldap.conf
CMD ["apache2-foreground"]
ENTRYPOINT ["/usr/local/bin/entrypoint"]