Posts by Exstramonium

    I finally made it, the problem was not that my printer was not recognized but that I did not "give" the usb bus to the container.

    An other problem I encountered was that kodi already used the avahi port and and needed it to advertise my printer on my local network

    I solved that by asking for a second IP for my device

    Code
    ip addr add 192.168.1.32 dev eth0

    Check your printer can be found with

    Code
    lsusb

    Save its location in a variable, my printer is a Canon, change with yours

    Code
    BUS=$(/opt/sbin/lsusb|grep Canon|awk '{print $2}')
    DEV=$(/opt/sbin/lsusb|grep Canon|awk '{print $4}')
    DEV="${DEV%?}"
    PRINTER="/dev/bus/usb/$BUS/$DEV"

    Then I finally ran the docker command

    Code
    docker run -d -p 192.168.1.32:631:631 -p 192.168.1.32:5353:5353 -e ADMIN_PASSWORD=mySecretPassword --name cups-server --device=$PRINTER ydkn/cups:latest

    Now, from another device on the local network try https://192.168.1.32:631, go in the administration panel and add your printer (username admin, password mySecretPassword which you have of course changed)

    Now add a printer, search a printer a the network, host 192.168.1.32 and you should find it

    Many thanks to Setting up a CUPS server with Docker on a Synology NAS for my Brother printer