Giter Site home page Giter Site logo

Can't run image about apacheds-docker HOT 9 CLOSED

ome avatar ome commented on July 16, 2024
Can't run image

from apacheds-docker.

Comments (9)

sbesson avatar sbesson commented on July 16, 2024

@nicolasduminil a priori this indicates either an issue with your LDIF configuration or with the mounting.

To be able to distinguish, could you try the same command using the original LDIF file provided in the base image i.e.

$ wget https://raw.githubusercontent.com/ome/apacheds-docker/master/instance/config.ldif && mv config.ldif /tmp/config.ldif
$ docker run --name ldap -d -p 389:10389 --rm -v /tmp/config.ldif:/bootstrap/conf/config.ldif:ro openmicroscopy/apacheds
```

and see if that command initializes a running container?

If it does, it is possible you might need to specify your apacheDS instance by setting the `APACHEDS_INSTANCE` environment variable as defined in https://github.com/ome/apacheds-docker#customization?

from apacheds-docker.

nicolasduminil avatar nicolasduminil commented on July 16, 2024

@sbesson : Many thanks for your suggestion. Yes, using the original LDIF works as expected, showing that the issue was with my LDIF file.
Kind regards,
Nicolas

from apacheds-docker.

nicolasduminil avatar nicolasduminil commented on July 16, 2024

@sbesson : Trying to find the issue in my ldif file but unsuccessfuly. Even a simple test file as follows:

# Organization for Example Corporation
dn: dc=example,dc=com
objectClass: dcObject
objectClass: organization
dc: example
o: Example Corporation
description: The Example Corporation

# Organizational Role for Directory Manager
dn: cn=Manager,dc=example,dc=com
objectClass: organizationalRole
cn: Manager
description: Directory Manager

won't work. Any suggestion please ?

from apacheds-docker.

nicolasduminil avatar nicolasduminil commented on July 16, 2024

By the way, starting the image with the ome.ldif file, provided in this repository, doesn't work neither. The only way that I managed to get it starting was with the default ldif file, either by not mounting any file, or mounting the default config.ldif file. As for the server instance, my understanding is that the parameter is optional and, if present, it might be any arbitrary chosen name, right ?

from apacheds-docker.

sbesson avatar sbesson commented on July 16, 2024

Thanks for pasting a complete example of your ldif file. Since you are using a different root dc than the default one used in this repository (openmicroscopy.org), you will need to also modify the instance configuration files instance/config.ldif and instance/ads-contextentry.decoded accordingly as mentioned here.

from apacheds-docker.

nicolasduminil avatar nicolasduminil commented on July 16, 2024

Many thanks again for your update but I'm not sure how and when to do that. I can't start the image since its root dc isn't in phase with mine and I can't modify the root dc as long as the image isn't started. Could you please update the documentation and to provide the command required to start the image and to subsequently customize the root dc ? Alternatively, if this image doesn't support such an option, please state it clearly. In any case, starting the image with the default configuration and using sed commands in order to modify the root dc and then manually import the new LDIF file, is not an option in a containerized environment.

from apacheds-docker.

sbesson avatar sbesson commented on July 16, 2024

In any case, starting the image with the default configuration and using sed commands in order to modify the root dc and then manually import the new LDIF file, is not an option in a containerized environment.

I think there is some confusion as there are two suggested paths to customize the default configuration:

  • the Custom Root DC section suggests a list of minimal steps to modify the configuration files to use a different root. As mentioned in the README, this requires the image to be rebuilt with these modifications before starting a container. This workflow is not meant to be executed in a running instance of the openmicroscopy:apacheds image as the server will be initialized with the default root dc.
  • the first paragraph of the Customization section includes the generic command to use the existing image with a custom server LDIF file and APACHEDS_INSTANCE. In this case, the LDIF file must specify a complete configuration of the ApacheDS server as documented in https://directory.apache.org/apacheds/advanced-ug/2.1-config-description.html. My suspicion is that the minimal file described in #29 (comment) lacks some of the parameters required to initialize the server. Following the recommendations of the ApacheDS documentation, have you tried to use Apache DirectoryStudio to create a working configuration and export it as a LDIF file that can be used in this workflow?

Could you please update the documentation and to provide the command required to start the image and to subsequently customize the root dc ? Alternatively, if this image doesn't support such an option, please state it clearly.

Thanks for the feedback. This image is primarily for internal purposes and aims to provide a default set-up allowing to test our wn software with an LDAP server. Many assumptions like the root dc are made on purpose and the goal is not to support an official extensible Docker image for Apache Directory at this point although we are giving pointers to customize the configuration or use the repository as a starting point.
Happy to try and add a sentence at the beginning of the README to capture the scope of this repository if that's useful

from apacheds-docker.

nicolasduminil avatar nicolasduminil commented on July 16, 2024

Hi, given your explanations above, my understanding is that the root dc customization is better done by extending and rebuilding the image, right ? Sorry for the confusion, I thought that I could just start the image with a mount point that contains the new root dc config file.
Another way would be, as far as I understood, to start the image with the default configuration and to launch a script creating a new instance and customizing the configuration files. Not sure how to create a new instance of a running Apache DS directory service but I'll dig a little as the point is beyond the scope of this image.
And yes, I tried to import my LDIF file, posted above, via the Apache Directory Studio and, of course, it fails saying that the root dc is not the expected one. But now things are clear, many thanks for your help and support.

from apacheds-docker.

sbesson avatar sbesson commented on July 16, 2024

Yes, that's all correct. I think extending & rebuilding is probably your best approach for customizing the root DC. I have opened #30 to amend the customization section of the README using your feedback

from apacheds-docker.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.