Docker Community Forums

Share and learn in the Docker community.

DBus use across multiple containers

I’m trying to make 2 containers, one with AVAHI and one with CUPS. Since both use dbus and I’ve seen containers made, sharing /var/run/dbus, I did the same. The dbus service is running on the host and the two containers share that directory thus to get at system_bus_socket contained therein. AVAHI worked pretty well. So does CUPS, it tells dbus to publish printers I defined and dbus tells AVAHI to make it so.

I believe I’m doing something fundamentally wrong, however. When CUPS asked that the COLORD daemon be started, it started on the host, not in the CUPS container. I believe my fundamental error is thinking that I could share the DBUS daemon across multiple containers. Can this be done?

Hi Robbin, have you found it this is possible? I need to write a set of applications that should interact among each other and to some hardware trough DBus. Any advices you could share?