You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

entrypoint.sh 847B

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. # When not limiting the open file descritors limit, the memory consumption of
  3. # slapd is absurdly high. See https://github.com/docker/docker/issues/8231
  4. ulimit -n 8192
  5. set -em
  6. "$@" &
  7. # apt install errors with conflicts due to the slapd state (and its version perhaps) in the Dockerfile
  8. # marking it "hold" does not work due to other dependencies.
  9. #apt update && \
  10. # DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y ldap-utils && \
  11. # apt clean && \
  12. # rm -rf /var/lib/apt/lists/*
  13. # we enable job control to send the slapd to background, but still to be able to pre-populate
  14. # the directory AND having memberof already working.
  15. sleep 2 # might be a race condition
  16. for file in `ls /etc/ldap/prepopulate/*.ldif`; do
  17. ldapadd -x -D "cn=admin,dc=nextcloud,dc=ci" -w "$SLAPD_PASSWORD" -f "$file"
  18. done
  19. fg