commit inicial
This commit is contained in:
40
files/Dockerfile
Normal file
40
files/Dockerfile
Normal file
@@ -0,0 +1,40 @@
|
||||
FROM debian:stable-slim
|
||||
|
||||
MAINTAINER Mauro Torrez <contact@mau.ro>
|
||||
|
||||
ENV OPENLDAP_ROOT_PASSWORD="root"
|
||||
|
||||
# space-separated list of schemas
|
||||
ENV OPENLDAP_SCHEMAS="misc"
|
||||
|
||||
ENV OPENLDAP_BACKUP_MIN="0"
|
||||
ENV OPENLDAP_BACKUP_HOUR="1"
|
||||
ENV OPENLDAP_BACKUP_DOM="*"
|
||||
ENV OPENLDAP_BACKUP_MON="*"
|
||||
ENV OPENLDAP_BACKUP_DOW="*"
|
||||
# TODO configurar Cron de backup
|
||||
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
slapd \
|
||||
ldap-utils && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
# TODO backup and restore
|
||||
# ADD ldap_backup.sh /usr/local/sbin/ldap_backup.sh
|
||||
# ADD ldap_restore.sh /usr/local/sbin/ldap_restore.sh
|
||||
|
||||
# add my_custom_schema: install by setting OPENLDAP_SCHEMAS=my_custom_schema
|
||||
# COPY my_custom_schema.ldif /etc/ldap/schema/my_custom_schema.ldif
|
||||
|
||||
EXPOSE 389
|
||||
|
||||
VOLUME ["/etc/ldap/slapd.d", "/var/lib/ldap", "/var/backups/ldap"]
|
||||
|
||||
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
|
||||
# log level info:
|
||||
|
||||
CMD ["slapd", "-d", "32768", "-u", "openldap", "-g", "openldap"]
|
||||
Reference in New Issue
Block a user