Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-php-ext-configure ldap should fail when libldap-common is not available #1228

Closed
thinkl33t opened this issue Nov 29, 2021 · 6 comments
Labels
Request Request for image modification or feature

Comments

@thinkl33t
Copy link

thinkl33t commented Nov 29, 2021

Since the change reported in #1194, and tracked down in #1194 (comment) , we have encountered multiple pieces of containerized PHP software that have been failing to connect to LDAP, and they have all led back to this common issue.

Since it is non-obvious to developers that installing the ldap module will require this dependency, i suggest either:

  1. install it by default in the php debian-based containers
  2. install it on demand when docker-php-ext-configure ldap is run
  3. cause installation to fail if it is not installed when docker-php-ext-configure ldap is run

I think (1) would be the easiest, but obviously adds a dependency that would be unwanted in a lot of installations.

@thinkl33t
Copy link
Author

Note: this effects LDAP with TLS - I believe insecure LDAP still works OK, but shouldn't be used for obvious reasons.

@yosifkit
Copy link
Member

yosifkit commented Dec 3, 2021

  1. install it by default in the php debian-based containers

While the package is very small (https://packages.debian.org/buster/libldap-common), we do not install extra packages for extensions that aren't enabled by default.

  1. install it on demand when docker-php-ext-configure ldap is run

We do not want to maintain the extension to required packages mapping; that is the goal of https://github.com/mlocati/docker-php-extension-installer. (it looks like they have not updated to ensure libldap-common, so maybe an issue or PR there would help others)

  1. cause installation to fail if it is not installed when docker-php-ext-configure ldap is run

Detecting if it is installed would be maintaining the same map as auto-installing it; see previous answer.

@thinkl33t
Copy link
Author

I have opened an issue upstream with docker-php-extension-installer

@thinkl33t
Copy link
Author

I have added libldap-common to ldap on docker-php-extension-installer, but I can't find any way in which the php container specifications here actually consume that script? Am i missing something or is it completely unrelated?

@phy25
Copy link

phy25 commented Dec 6, 2021

https://github.com/mlocati/docker-php-extension-installer#usage

"php" does not consume "docker-php-extension-installer".

@tianon
Copy link
Member

tianon commented Dec 6, 2021

We do not want to maintain the extension to required packages mapping; that is the goal of https://github.com/mlocati/docker-php-extension-installer.

🙈 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Request Request for image modification or feature
Projects
None yet
Development

No branches or pull requests

5 participants