Skip to content

/var/run/slapd also has to be accessible to slapd #4

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

Merged
merged 1 commit into from
Sep 26, 2015

Conversation

rysiekpl
Copy link
Contributor

Sharing unix sockets via data-only containers is a viable way of communicating between processes; to do this, however, /var/run/slapd has to be on a volume from an external container. There is no guarantee that it will have the correct permissions, hence the need to chown it in the entrypoint script.

Sharing unix sockets via data-only containers is a viable way of communicating between processes; to do this, however, `/var/run/slapd` has to be on a volume from an external container. There is no guarantee that it will have the correct permissions, hence the need to `chown` it in eintrypoint script.
dinkel added a commit that referenced this pull request Sep 26, 2015
/var/run/slapd also has to be accessible to slapd
@dinkel dinkel merged commit d6fd848 into dinkel:master Sep 26, 2015
@dinkel
Copy link
Owner

dinkel commented Sep 26, 2015

Hello rysiekpl,

I just merged your pull request, thanks for that.

I however don't really understand, in what circumstances this sharing of unix sockets becomes handy. Do you have a real world example to explain it to me?

Thanks,

Dinkel

@rysiekpl
Copy link
Contributor Author

Sure. For instance when you want to have containers with software connecting to the LDAP server, but for one reason or other using TCP/IP is unwieldy or impossible.

Consider two containers that you want to be able to connect to the LDAP server. Using docker links means that they are connected via TCP/IP, and that means that their IP addresses must remain constant, and that they have to have TCP/IP connectivity between them. If for some reason you recreate the LDAP container, its IP address will change, and that means that either there is a way for the other containers to have that info updated too, or they will loose connectivity.

If, on the other hand, they comminicate with the LDAP container via a UNIX socket in a volume-mounded directory, the containers can be recreated as much as you want, and their IP addresses can change, but the containers will still be able to connect via the UNIX socket.

@dinkel
Copy link
Owner

dinkel commented Sep 27, 2015

OK, I understand now. Thanks!

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

Successfully merging this pull request may close these issues.

2 participants