Dockerized CUPS server
Examples use docker-compose >= 1.2. If you do not have it, install it in a
You can use this image with 2 methods:
Secured. Default behavior.
./docker-compose -f production.yml up
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
FROM yajo/cupsd ADD passwd.md5 /etc/cups/
Use lpadmin in
Dockerfile for installing an HP printer could be:
FROM yajo/cupsd RUN yum -y install hplip && yum clean all ADD install-printers.sh /opt/
/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.
- 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.
You can take the reports were printed for All Users ????