Skip to content

Can't mount bootstrap.ldif #173

Open
@holms

Description

@holms

Following your readme file:

$ ls bootstrap.ldif
bootstrap.ldif
docker run \
  --volume ./bootstrap.ldif:/container/service/slapd/assets/config/bootstrap/ldif/50-bootstrap.ldif \
  osixia/openldap:1.1.10 --copy-service
docker: Error response from daemon: create ./bootstrap.ldif: "./bootstrap.ldif" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path.
See 'docker run --help'.

Also trying from docker-compose.yml:

 openldap:
       image: osixia/openldap:1.1.10
       volumes:
         - ./bootstrap.ldif:/container/service/slapd/assets/config/bootstrap/ldif/50-bootstrap.ldif

Here's the output

Attaching to jupyterhub_openldap_1
openldap_1      | *** CONTAINER_LOG_LEVEL = 3 (info)
openldap_1      | *** Search service in CONTAINER_SERVICE_DIR = /container/service :
openldap_1      | *** link /container/service/:ssl-tools/startup.sh to /container/run/startup/:ssl-tools
openldap_1      | *** failed to link /container/service/:ssl-tools/startup.sh to /container/run/startup/:ssl-tools: [Errno 17] File exists
openldap_1      | *** link /container/service/slapd/startup.sh to /container/run/startup/slapd
openldap_1      | *** failed to link /container/service/slapd/startup.sh to /container/run/startup/slapd: [Errno 17] File exists
openldap_1      | *** link /container/service/slapd/process.sh to /container/run/process/slapd/run
openldap_1      | *** directory /container/run/process/slapd already exists
openldap_1      | *** failed to link /container/service/slapd/process.sh to /container/run/process/slapd/run : [Errno 17] File exists
openldap_1      | *** Set environment for startup files
openldap_1      | *** Environment files will be proccessed in this order :
openldap_1      | Caution: previously defined variables will not be overriden.
openldap_1      | /container/environment/99-default/default.yaml
openldap_1      | /container/environment/99-default/default.startup.yaml
openldap_1      |
openldap_1      | To see how this files are processed and environment variables values,
openldap_1      | run this container with '--loglevel debug'
openldap_1      | *** Running /container/run/startup/:ssl-tools...
openldap_1      | *** Running /container/run/startup/slapd...
openldap_1      | Start OpenLDAP...
openldap_1      | Waiting for OpenLDAP to start...
openldap_1      | Add TLS config...
openldap_1      | No certificate file and certificate key provided, generate:
openldap_1      | /container/service/slapd/assets/certs/ldap.crt and /container/service/slapd/assets/certs/ldap.key
openldap_1      | 2017/12/10 20:34:07 [INFO] generate received request
openldap_1      | 2017/12/10 20:34:07 [INFO] received CSR
openldap_1      | 2017/12/10 20:34:07 [INFO] generating key: ecdsa-384
openldap_1      | 2017/12/10 20:34:07 [INFO] encoded CSR
openldap_1      | 2017/12/10 20:34:07 [INFO] signed certificate with serial number 663513802258257954650810259317381344306403135806
openldap_1      | Link /container/service/:ssl-tools/assets/default-ca/default-ca.pem to /container/service/slapd/assets/certs/ca.crt
openldap_1      | Disable replication config...
openldap_1      | Stop OpenLDAP...
openldap_1      | Configure ldap client TLS configuration...
openldap_1      | Remove config files...
openldap_1      | rm: cannot remove '/container/service/slapd/assets/config/bootstrap/ldif/50-bootstrap.ldif': Device or resource busy
openldap_1      | *** /container/run/startup/slapd failed with status 1
openldap_1      |
openldap_1      | *** Killing all processes...

Activity

BertrandGouny

BertrandGouny commented on Dec 12, 2017

@BertrandGouny
Member

Hello,
the file seems mounted, the container try to remove it after bootstrap set :
LDAP_REMOVE_CONFIG_AFTER_SETUP to false to keep it.

Or run the container with --copy-service so the file will be copied and only the copy will be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @holms@BertrandGouny

        Issue actions

          Can't mount bootstrap.ldif · Issue #173 · osixia/docker-openldap