Public | Automated Build

Last pushed: 2 years ago
Short Description
A CUPS server in CentOS, ready to install printers and run in production
Full Description

Dockerized CUPS server

A CUPS server installed in CentOS 7.

Production

Examples use docker-compose >= 1.2. If you do not have it, install it in a
virtualenv with:

./setup.sh

You can use this image with 2 methods:

  1. Secured. Default behavior.

     ./docker-compose -f production.yml up
    
  2. Permissive. All users can do everything without authentication, except
    adding, modifying and deleting printers and classes, and setting the default
    options.

     ./docker-compose -f production.permissive.yml up
    

Setting up users

The server comes with two users preconfigured:

  • admin, with password ad1234. Belongs to group sys.

  • user, with password us1234. Belongs to group lp.

If you want to change those, use lppasswd and add your custom
/etc/cups/passwd.md5 file:

FROM yajo/cupsd
ADD passwd.md5 /etc/cups/

Installing printers

Use lpadmin in /opt/install-printers.sh:

Your Dockerfile for installing an HP printer could be:

FROM yajo/cupsd
RUN yum -y install hplip && yum clean all
ADD install-printers.sh /opt/

And your /opt/cups/install-printers.sh could contain:

#!/usr/bin/bash
set -x
lpadmin -U admin -p color-printer -v ipp://192.168.0.100 -E \
    -P /usr/share/ppd/HP/hp-officejet_pro_451_series-ps.ppd.gz

It will be executed and then removed.

Known issues

  • I have not figured out how to make it autodiscover printers. However, it
    does not matter very much, as the purpose of this image is to subclass it
    and install printers through the child Dockerfile. But if you know how to do
    it, any help is welcome.
Docker Pull Command
Owner
yajo
Source Repository

Comments (1)
nelfel
a year ago

You can take the reports were printed for All Users ????