CUPS server with docker

  • Hi,

    I would like to plug my old printer in my rpi4 on which libre-elec is installed and then print

    All the documentation I found about docker can only install images from

    But I'd like to install this one Docker Hub

    Is there a way ?

    Or should I go with linuxserver/rdesktop with extra port redirection and install CUPS in it ?

    Thanks for any help

    Solved here : CUPS server with docker

  • ones can be installed via addons for added convenience and ease of use but you can use any docker image via command line (docker run) or portainer on libreelec (assuming you're using the correct arch)

  • 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

    1. ip addr add dev eth0

    Check your printer can be found with

    1. lsusb

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

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

    Then I finally ran the docker command

    1. docker run -d -p -p -e ADMIN_PASSWORD=mySecretPassword --name cups-server --device=$PRINTER ydkn/cups:latest

    Now, from another device on the local network try, 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 and you should find it

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