[GH-ISSUE #56] Fails to build #35

Closed
opened 2026-02-27 16:47:44 +03:00 by kerem · 2 comments
Owner

Originally created by @nicholaicascio on GitHub (Sep 25, 2024).
Original GitHub issue: https://github.com/rroemhild/docker-test-openldap/issues/56

[cont-init.d] 050-openldap-populate: exited 0.
[cont-init.d] done.
[services.d] starting services
starting slapd
[services.d] done.
66f45e62 @(#) $OpenLDAP: slapd  (May 14 2022 18:35:44) $
        Debian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>
66f45e62 slapd starting
66f45e7e conn=1000 fd=15 ACCEPT from IP=127.0.0.1:46432 (IP=0.0.0.0:10389)
66f45e7e conn=1000 op=0 do_bind: invalid dn (${LDAP_BINDDN})
66f45e7e conn=1000 op=0 RESULT tag=97 err=34 text=invalid DN
66f45e7e conn=1000 op=1 UNBIND
66f45e7e conn=1000 fd=15 closed
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
66f45e88 daemon: shutdown requested and initiated.
66f45e88 slapd shutdown: waiting for 0 operations/tasks to finish
66f45e88 slapd stopped.
[s6-finish] sending all processes the KILL signal and exiting.

Trying to build this following your instruction and getting this dn error

Originally created by @nicholaicascio on GitHub (Sep 25, 2024). Original GitHub issue: https://github.com/rroemhild/docker-test-openldap/issues/56 ``` [cont-init.d] 050-openldap-populate: exited 0. [cont-init.d] done. [services.d] starting services starting slapd [services.d] done. 66f45e62 @(#) $OpenLDAP: slapd (May 14 2022 18:35:44) $ Debian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org> 66f45e62 slapd starting 66f45e7e conn=1000 fd=15 ACCEPT from IP=127.0.0.1:46432 (IP=0.0.0.0:10389) 66f45e7e conn=1000 op=0 do_bind: invalid dn (${LDAP_BINDDN}) 66f45e7e conn=1000 op=0 RESULT tag=97 err=34 text=invalid DN 66f45e7e conn=1000 op=1 UNBIND 66f45e7e conn=1000 fd=15 closed [cont-finish.d] executing container finish scripts... [cont-finish.d] done. [s6-finish] waiting for services. [s6-finish] sending all processes the TERM signal. 66f45e88 daemon: shutdown requested and initiated. 66f45e88 slapd shutdown: waiting for 0 operations/tasks to finish 66f45e88 slapd stopped. [s6-finish] sending all processes the KILL signal and exiting. ``` Trying to build this following your instruction and getting this dn error
kerem closed this issue 2026-02-27 16:47:44 +03:00
Author
Owner

@adam-seely commented on GitHub (Oct 23, 2024):

I'm having the same issue, did you find a solution?

<!-- gh-comment-id:2432629153 --> @adam-seely commented on GitHub (Oct 23, 2024): I'm having the same issue, did you find a solution?
Author
Owner

@randallmorse commented on GitHub (Mar 24, 2025):

I just ran into the same issue, its because docker does not automatically substitute environment variables in the HEALTHCHECK instruction.

If you comment out the existing health heck line and replace it with the following it will work.

# Add a healthcheck script
RUN echo '#!/bin/sh' > /healthcheck.sh && \
    echo 'ldapsearch -H ldap://127.0.0.1:10389 -D "${LDAP_BINDDN}" -w "${LDAP_SECRET}" -b "${LDAP_BINDDN}" >/dev/null 2>&1 || exit 1' >> /healthcheck.sh && \
    chmod +x /healthcheck.sh

HEALTHCHECK CMD /healthcheck.sh
<!-- gh-comment-id:2749306495 --> @randallmorse commented on GitHub (Mar 24, 2025): I just ran into the same issue, its because docker does not automatically substitute environment variables in the HEALTHCHECK instruction. If you comment out the existing health heck line and replace it with the following it will work. ``` # Add a healthcheck script RUN echo '#!/bin/sh' > /healthcheck.sh && \ echo 'ldapsearch -H ldap://127.0.0.1:10389 -D "${LDAP_BINDDN}" -w "${LDAP_SECRET}" -b "${LDAP_BINDDN}" >/dev/null 2>&1 || exit 1' >> /healthcheck.sh && \ chmod +x /healthcheck.sh HEALTHCHECK CMD /healthcheck.sh ```
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/docker-test-openldap#35
No description provided.