olbat / dockerfiles

A collection of Dockerfiles
https://hub.docker.com/u/olbat/
GNU General Public License v3.0
132 stars 73 forks source link

mounting volume for passing printer seems not to work anymore #103

Open ziipzaaapM16A4 opened 6 months ago

ziipzaaapM16A4 commented 6 months ago

passing the printer by volume like this -v /var/run/dbus:/var/run/dbus seems not to work anymore. i got it working again with --device /var/run/dbus/<busOfYourHost>/<deviceNumber> figured out the bus number and device number by lsusb

olbat commented 4 months ago

Thank you for sharing this, I'll give it a shot and update the doc.

xf22cn commented 2 months ago

sudo docker run -d -p 631:631 -v /var/run/dbus:/var/run/dbus -v /dev/bus/usb:/dev/bus/usb --privileged=true --name cupsd olbat/cupsd

I used the above command to create a container, found and installed the printer. At first, I used the command provided by the author to create a container, but I couldn't find the printer. This problem has also been encountered by someone before, and it was his proposed solution. The original link is as follows:

https://forum.openmediavault.org/index.php?thread/43736 -switch-off-and-on-re-plug-usb-printer-with-olbat-cupsd/

Note that the container runs in privileged mode.