The problem seems to be, I can not run the dbus service inside
a Docker container.
My Dockerfile executes a script
#!/bin/sh
# CMD for xsane Dockerfile
service dbus start
/usr/bin/xsane
ie just 2 lines, start dbus and then run xsane.
I get the following
xhost +
$ docker run -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -h $HOSTNAME -v $HOME/.Xauthority:/home/nevj/.Xauthority --device=/dev/dri/card0 myxsane:v2
+ /usr/bin/xsane
dbus[8]: arguments to dbus_connection_send() were incorrect, assertion "connection != NULL" failed in file ../../../dbus/dbus-connection.c line 3316.
This is normally a bug in some application using the D-Bus library.
D-Bus not built with -rdynamic so unable to print a backtrace
Aborted
So dbus seems to be present in the container, but not able to communicate properly.
Given that I have now solved my xsane scanner issue another way
Xsane, network scanner, and MX23.1 - #27 by nevj
I think we might put the Xsane-docker-container issue on the shelf.
It is an interesting challenge, but rather time consuming.
Thank you all for responses.