osixia / docker-phpLDAPadmin

phpLDAPadmin container image 🐳🌴
MIT License
842 stars 196 forks source link

`invalid type` error when using YAML for `PHPLDAPADMIN_LDAP_HOSTS` #96

Open The-Judge opened 2 years ago

The-Judge commented 2 years ago

When I am trying to set PHPLDAPADMIN_LDAP_HOSTS to some YAML structure as shown in the docs, I end up with an error, saying:

docker-compose up -d

ERROR: The Compose file './docker-compose.yml' is invalid because: services.phpldapadmin.environment.PHPLDAPADMIN_LDAP_HOSTS contains [{"ldap.example.com": [{"server": [{"tls": "true"}]}, {"login": [{"bind_id": "cn=admin,dc=example,dc=com"}]}]}], which is an invalid type, it should be a string, number, or a null

My docker-compose.yml file:

version: '3.2'

services:

  phpldapadmin:
    image: osixia/phpldapadmin:latest
    container_name: phpldapadmin
    environment:
      PHPLDAPADMIN_LDAP_HOSTS:
        - ldap.example.com:
          - server:
            - tls: "true"
          - login:
            - bind_id: "cn=admin,dc=example,dc=com"
      PHPLDAPADMIN_HTTPS: "false"
    ports:
      - 80
    hostname: "ldap.example.com"
cod3monk commented 1 year ago

Having the same issue.

Gabgobie commented 1 year ago

+1

peedy2495 commented 9 months ago

+1