Public | Automated Build

Last pushed: 3 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.


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


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

     ./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/

Your Dockerfile for installing an HP printer could be:

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

And your /opt/cups/ could contain:

set -x
lpadmin -U admin -p color-printer -v ipp:// -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
Source Repository