slapd docker image

wkd
meskio 1 year ago
commit 09248f0185
Signed by: meskio
GPG Key ID: 52B8F5AC97A2DA86
  1. 22
      Dockerfile
  2. 2
      debconf-selections
  3. 11
      docker-compose.yml
  4. 9
      sindominio.ldif
  5. 13
      sindominio.schema

@ -0,0 +1,22 @@
FROM registry.sindominio.net/debian
COPY debconf-selections /etc/debconf-slapd-selections
RUN debconf-set-selections /etc/debconf-slapd-selections
RUN apt-get update && \
apt-get install -y --no-install-recommends slapd && \
apt-get clean && rm -rf /var/lib/apt/lists/*
RUN chmod -R o+rw /etc/ldap/slapd.d/ && \
chmod o+rwx /etc/ldap/slapd.d/cn=config/ && \
chmod o+rwx /etc/ldap/slapd.d/cn=config/cn=schema/ && \
chmod o+rw /var/run/slapd/
COPY sindominio.schema /etc/ldap/schema/
COPY sindominio.ldif /etc/ldap/schema/
RUN slapd -T add -n 0 -l /etc/ldap/schema/sindominio.ldif
VOLUME ["/var/lib/ldap"]
ENTRYPOINT ["/usr/sbin/slapd"]
CMD ["-h", "ldap://0.0.0.0:3389/", "-dNone"]

@ -0,0 +1,2 @@
slapd slapd/password1 password password
slapd slapd/password2 password password

@ -0,0 +1,11 @@
ldap:
container_name: ldap
hostname: ldap
image: registry.sindominio.net/ldap
restart: always
user: 114:65534
ports:
- "389:3389"
volumes:
- /opt/ldap/config:/etc/ldap/slapd.d
- /opt/ldap/lib:/var/lib/ldap

@ -0,0 +1,9 @@
dn: cn=sindominio,cn=schema,cn=config
objectClass: olcSchemaConfig
cn: sindominio
olcAttributeTypes: ( 1.3.6.1.4.1.42023.11 NAME 'sdRole' DESC 'Rol en SinDominio'
SUP name SINGLE-VALUE )
olcAttributeTypes: ( 1.3.6.1.4.1.42023.12 NAME 'sdLocked'
DESC 'Cuenta de SinDominio bloqueada' SUP name )
olcObjectClasses: ( 1.3.6.1.4.1.42023.10 NAME 'sdPerson'
DESC 'Personas de SinDominio' SUP top AUXILIARY MUST sdRole MAY sdLocked )

@ -0,0 +1,13 @@
attributetype ( 1.3.6.1.4.1.42023.11 NAME 'sdRole'
DESC 'Rol en SinDominio'
SUP name SINGLE-VALUE)
attributetype ( 1.3.6.1.4.1.42023.12 NAME 'sdLocked'
DESC 'Cuenta de SinDominio bloqueada'
SUP name)
objectclass ( 1.3.6.1.4.1.42023.10 NAME 'sdPerson'
DESC 'Personas de SinDominio'
SUP top AUXILIARY
MUST sdRole
MAY sdLocked)
Loading…
Cancel
Save