Skip to content

mounting ldif dir won't work #179

Open
@doertedev

Description

@doertedev

Hi.

I'm doing this from a VM:

rm -rf ./ldif && cp -r /vagrant/ldif/ . && chmod 777 -R ./ldif && docker run --name="openldap" --rm -p 389:389 -v /vagrant/ldap/docker.env.yaml:/container/environment/01-custom/env.yaml -v /root/ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom osixia/openldap:1.1.11

Which fails with:

*** CONTAINER_LOG_LEVEL = 3 (info)
*** Search service in CONTAINER_SERVICE_DIR = /container/service :
*** link /container/service/:ssl-tools/startup.sh to /container/run/startup/:ssl-tools
*** link /container/service/slapd/startup.sh to /container/run/startup/slapd
*** link /container/service/slapd/process.sh to /container/run/process/slapd/run
*** Set environment for startup files
*** Environment files will be proccessed in this order : 
Caution: previously defined variables will not be overriden.
/container/environment/01-custom/env.yaml
/container/environment/99-default/default.yaml
/container/environment/99-default/default.startup.yaml

To see how this files are processed and environment variables values,
run this container with '--loglevel debug'
*** Running /container/run/startup/:ssl-tools...
*** Running /container/run/startup/slapd...
Database and config directory are empty...
Init new ldap server...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of stop.
  Backing up /etc/ldap/slapd.d in /var/backups/slapd-2.4.44+dfsg-5+deb9u1... done.
  Creating initial configuration... done.
  Creating LDAP directory... done.
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Start OpenLDAP...
Waiting for OpenLDAP to start...
Add bootstrap schemas...
config file testing succeeded
Add image bootstrap ldif...
Add read only user...
Add custom bootstrap ldif...
Disable replication config...
Stop OpenLDAP...
Remove config files...
rm: cannot remove '/container/service/slapd/assets/config/bootstrap/ldif/custom': Device or resource busy
*** /container/run/startup/slapd failed with status 1

*** Killing all processes...

Copy-mounting the parent directory in there won't work either because then he can't find the other files:
sed: can't read /container/service/slapd/assets/config/bootstrap/ldif/01-config-password.ldif: No such file or directory

Advice?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions