LibreBooking / docker

Librebooking as a docker container
GNU General Public License v3.0
11 stars 12 forks source link

LDAP support #58

Closed alaouiz closed 1 year ago

alaouiz commented 1 year ago

Hello All,

I'm trying to use LDAP with the Librebooking docker and I tried to enable LDAP. I'm getting the following error:

image

Where should I configure the LDPA settings ? image

Regards,

Zaidan

VitorTakami commented 1 year ago

Good night, how did you get that ? Because it need to mount /var/www/html

colisee commented 1 year ago

Hi @alaouiz

None of the librebooking/librebooking images implement ldap at the moment. I need to make some investigations and I will revert to you.

colisee commented 1 year ago

Hi @VitorTakami

Good night, how did you get that ? Because it need to mount /var/www/html

No, you do not mount /var/www/html with the version-2 of the librebooking/librebooking images. Please refer to the documentation

colisee commented 1 year ago

Hi again @alaouiz ,

Before I make any changes to the Dockerfile, could you please run the following commands? I assume your nextcloud container is named nextcloud:

Updated instructions as of 2023-09-18

docker exec -t nextcloud bash -c 'apt update && apt upgrade -y'
docker exec -t nextcloud bash -c 'curl -sSLf -o /usr/local/bin/install-php-extensions https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions'
docker exec -t nextcloud bash -c 'chmod +x /usr/local/bin/install-php-extensions'
docker exec -t nextcloud bash -c 'install-php-extensions ldap'
docker stop nextcloud
docker start nextcloud

Then:

  1. Go back to the Application configuration menu in librebooking
  2. Select the configuration file Authentication-Ldap (by default, it is config.php)
  3. Enter the LDAP configuration and update

If it works for you, then I will make the change in the Dockerfile and generate a new image in the docker hub repository.

alaouiz commented 1 year ago

Thanks a lot Colisee,

After following the instructions above:

docker exec -t librebooking bash -c 'apt update && apt upgrade -y' docker exec -t librebooking bash -c 'curl -sSLf -o /usr/local/bin/install-php-extensions https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions' docker exec -t librebooking bash -c 'chmod +x /usr/local/bin/install-php-extensions' docker exec -t librebooking bash -c 'install-php-extensions ldap' docker stop librebooking docker start librebooking

I'm now getting the following error: image

when I try to install url: image

Please advise. Thanks

colisee commented 1 year ago

Hi @alaouiz ,

Unfortunately, I found out that php-8 which is required by librebooking version 2.8.6, broke its LDAP plugin. At this stage, there is nothing I can do now, for the problem must be fixed in the upstream repository.

If this is the first time your are deploying librebooking (ie. you have no data, yet), then I can try to add the ldap extension to the old docker image librebooking/librebooking:2.8.5.5-1.2.3 which uses php-7. Please, let me know if you are interested in.

alaouiz commented 1 year ago

Thanks Colisee,

I'm interested please. I can try librebooking/librebooking:2.8.5.5-1.2.3.

Best regards,

Zaidan

colisee commented 1 year ago

Hi @alaouiz ,

I finally made the changes to version-2 of the docker image. Please:

  1. Use the latest docker image librebooking:librebooking:2.8.5.5-2.3.0
  2. Make sure you are mapping the correct folder /config in the docker image, as indicated in the instructions
  3. Start from scratch (ie. with an empty /config)
colisee commented 1 year ago

@alaouiz , @VitorTakami , @effgarces

Please note that the docker images librebooking:librebooking:2.8.6 and librebooking:librebooking:develop cannot use the LDAP authentication (even though the LDAP extension is now included in the image) since php-8 broke the LDAP plugin and is not fixed in in upstream.

colisee commented 1 year ago

Hi @alaouiz, @VitorTakami, @effgarces

please note that the ldap plugin was just fixed in upstream. Thus, the docker image librebooking/librebooking:develop is now available and should work just fine.

As indicated before, docker image librebooking/librebooking:2.8.6 will not work with ldap and I will need to wait for the next upstream release (I guess 2.8.6.1).