I am trying to get a D-bus program up in a container.
I created the release container image and deployed it to the Apalis iMX8 board.
When I try to run image using docker run -it from the command line, I get the error.
dbus_bus_get: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
What is the complete docker run command that you tried to execute? You probably need some bind mounts when running the container, like /var/run/dbus
What are you trying to run in the container exactly? Another dbus instance, or are you just trying to access the one already running in TorizonCore, outside of containers?
Are you trying to run a graphical application in a container? If so, you can try running a separate weston container and then access it through bind mounts, like done in this article: Web Browser / Kiosk Mode with TorizonCore | Toradex Developer Center. In this case the non-weston container has to have some environment variables set, like DISPLAY.
I am trying to run Dbus inside 2 separate containers, and want these containers to communicate over D-bus. Not trying to run a graphical application yet.
The docker command that I invoked on the command line was : docker run -it container ID.
Hello the commands used with the release container created were
“docker run containerID”
“docker run -v /var/run/dbus:/var/run/dbus containerID”
“docker run -it containeID”
“docker run -it -v /var/run/dbus:/var/run/dbus containerID”
I am using a simple server and client program in dbus, which when copied directly to the board work fine, however, I am trying to create both these programs in containers and want them to communicate via dbus.
Uploaded the docker files of both client and server.
I have also tried the following commands. Tried to use the system daemon instead of the session daemon for dbus.
“docker run -it --privileged -v /var/run/dbus:/var/run/dbus containerID”
“docker run --security-opt “apparmor:unconfined” -it -v /var/run/dbus:/var/run/dbus containerID”
However I am still getting error.
dbus_bus_get: Connection “:1.312” is not allowed to own the service “com.example.add_client” due to security policies in the configuration file.
Can you please provide us with some minimal code that is able to reproduce the issue that you are facing? The Dockerfile as well.
The ones shared before are not usable: we cannot access the initial Docker Image (e.g. add-client_arm64v8-debian-no-ssh_bullseye_release_10d64962-2f4c-4c5b-b1c7-b421866a7aa8_sdk_image from on of your Dockerfiles)