ldap-server/phpldapadmin/Dockerfile

36 lines
1.2 KiB
Docker
Raw Normal View History

2022-12-14 21:57:05 +01:00
FROM debian:stable-slim
2023-05-18 16:20:46 +02:00
ARG PACKAGE="http://ftp.de.debian.org/debian/pool/main/p/phpldapadmin/phpldapadmin_1.2.6.3-0.3_all.deb"
2022-12-14 21:57:05 +01:00
ARG LDAP_BASE
ENV LDAP_BASE $LDAP_BASE
RUN apt-get update -y && apt dist-upgrade -y
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y wget
2023-05-18 16:20:46 +02:00
RUN cd /tmp/ && \
wget -O package.deb ${PACKAGE} && \
apt install -y ./package.deb && \
rm -rf /tmp/
2022-12-14 21:57:05 +01:00
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
2023-06-03 01:34:20 +02:00
RUN mkdir /tmp && chmod 777 /tmp/
2022-12-14 21:57:05 +01:00
ADD entrypoint.sh /entrypoint.sh
2023-06-03 01:34:20 +02:00
RUN sed -i "s/^.*setValue('server','host'.*/\$servers->setValue('server','host','ldap');/" /usr/share/phpldapadmin/config/config.php
#RUN sed -i "s/^.*setValue('server','host'.*/\$servers->setValue('server','host','ldap');/" /usr/share/phpldapadmin/config/config.php && \
# sed -i "s/^.*setValue('server','base'.*/\$servers->setValue('server','base',array('${LDAP_BASE}'));/" /usr/share/phpldapadmin/config/config.php && \
# sed -i "s/^.*setValue('login','bind_id'.*/\$servers->setValue('login','bind_id','cn=admin,${LDAP_BASE}');/" /usr/share/phpldapadmin/config/config.php
2022-12-14 21:57:05 +01:00
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
EXPOSE 80
CMD ["apachectl","-D","FOREGROUND"]
ENTRYPOINT ["/entrypoint.sh"]