osixia / docker-openldap

OpenLDAP container image 🐳🌴
MIT License
4.04k stars 976 forks source link

connection does not work with docker's default bridge network #124

Open rjwestman opened 7 years ago

rjwestman commented 7 years ago

Using this example compose file you will notice, that you won't be able to login with phpldapadmin (im going to go out on a limp and guess, that that happens with any other service on the bridge network, too).

If you remove the line network_mode: bridge it will work.

The only difference between dockers default bridge network and the example_default network bridge that will be created are the options as far as i could make out.

"Options": {
            "com.docker.network.bridge.default_bridge": "true",
            "com.docker.network.bridge.enable_icc": "true",
            "com.docker.network.bridge.enable_ip_masquerade": "true",
            "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
            "com.docker.network.bridge.name": "docker0",
            "com.docker.network.driver.mtu": "1500"

What can I do to make it work? I have a few other services on the default bridge network, that i want to be able to access ldap with.

My best GUESS is that it has something to do with the binding_ipv4.

I will try to continue hunting the issue down, but maybe some people here are more familiar with docker, phpldapadmin and openldap then i am (very very likely) and can help out :)

rjwestman commented 7 years ago

Hm i created a new network with

docker network create \    
--opt com.docker.network.bridge.enable_icc=true \
--opt com.docker.network.bridge.enable_ip_masquerade=true \
--opt com.docker.network.bridge.bridge.name="docker0" \
--opt com.docker.network.bridge.driver.mtu="1500" \
--opt com.docker.network.bridge.host_binding_ipv4="0.0.0.0" \
mybridge

and used that and it worked. im out of ideas :/

basically any network you create yourself will work. even the default bridge network that you create with docker network create mybridge. Ill dig a little deeper into what specifics i need for my own bridge, but will abandon the default bridge. Would be interesting to know what exactly the reason for this not working with the default bridge is though.