0

I installed the library with.

$sudo apt-get install slapd ldap-utils

While installing it stops and asks,

please enter the password for the admin entry in your ldap directory.

I am using Dockerfile, so I want to skip this procedure.

Is it possible?

3

1 Answer 1

1

I do like this in dockerfile

RUN echo 'slapd/root_password password password' | debconf-set-selections &&\
    echo 'slapd/root_password_again password password' | debconf-set-selections && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y slapd ldap-utils

#RUN apt-get install -y python3-dev libxml2-dev libxslt1-dev zlib1g-dev libsasl2-dev libldap2-dev build-essential libssl-dev libffi-dev libmysqlclient-dev libjpeg-dev libpq-dev libjpeg8-dev liblcms2-dev libblas-dev libatlas-base-dev
RUN apt-get install -y build-essential python3-dev python2.7-dev libldap2-dev libsasl2-dev 

RUN echo "slapd slapd/no_configuration boolean false" | debconf-set-selections
RUN echo "slapd slapd/domain string ldaptest.local" | debconf-set-selections
RUN echo "slapd shared/organization string 'LDAP Test'" | debconf-set-selections
RUN echo "slapd slapd/password1 password root_password" | debconf-set-selections
RUN echo "slapd slapd/password2 password root_password" | debconf-set-selections
RUN echo "jslapd slapd/backend select HDB" | debconf-set-selections
RUN echo "slapd slapd/purge_database boolean true" | debconf-set-selections
RUN echo "slapd slapd/allow_ldap_v2 boolean false" | debconf-set-selections
RUN echo "slapd slapd/move_old_database boolean true" | debconf-set-selections

RUN dpkg-reconfigure -f noninteractive slapd

RUN apt-get install ldap-utils slapd -y

#RUN apt-get install slapd -qq

RUN apt-get install ldap-utils tox lcov valgrind -y

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .