Skip to content

Optional CUPS utils on custom image #1895

Description

@martkaczmarek

Is your feature request related to a problem? Please describe.
I am interested in adding "Silent printing"/"Backend printing" functionality to my Docker install.
I stumbled upon the docs here: https://docs.frappe.io/erpnext/print-settings#3-network-printer-print-server
As a test, I took my running container and installed libcups2-dev and cups packages (still don't know if cups itself is needed). After running ./env/bin/pip install pycups and then bench restart, looks like a success - Frappe connects to CUPS:
Image
(it's definitely connecting becauses the printer name was fetched from the CUPS service)

Obviously it's just a test setup since the packages will not be retained in the container this way.

My question is: could we add the required packages and commands to dockerfile as optional, dependant on some build arg (e.g. INCLUDE_CUPS)? Of course it wouldn't be a good idea to add it for everyone since these packages easily add like 600MB of data.

I am definitely not an expert in dockerfiles so can't offer much contribution myself, but I'm happy to test things.

Describe alternatives you've considered
A different approach is to not use built-in function at all, instead to build separate module for generating PDFs and sending it to a dedicated container managing print jobs. A bit more convoluted.

Keep in mind all of that requires further testing, I just wanted to stop at "I think it could work".

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions