Containerized CUPS stack with IPP, Ghostscript, and Poppler.
320
Containerized CUPS printing stack with cups-filters, Ghostscript, and Poppler for full printing support.
The cups Docker image provides a complete printing stack, including CUPS, cups-filters, Ghostscript, and Poppler (for PostScript and PDF interpretation). This image delivers everything needed for printing (except printer-specific drivers) in a containerized environment. It’s designed for:
sudo apt-get update
sudo apt-get install cups-ipp-utils cups-client -y
To pull the image from Docker Hub, run:
sudo docker pull rudransh404/cups
Run the container:
sudo docker run -d \
--name cups \
--network host \
-e CUPS_PORT=<CUPS_PORT> \
-e CUPS_ADMIN=<CUPS_ADMIN> \
-e CUPS_PASSWORD=<CUPS_PASSWORD> \
-v /dev/bus/usb:/dev/bus/usb:ro \
--device-cgroup-rule='c 189:* rmw' \
rudransh404/cups:latest
CUPS_PORT (optional): Sets the CUPS port (default: 631).CUPS_ADMIN & CUPS_PASSWORD (optional): Administrative credentials. If omitted, view generated credentials:
sudo docker exec cups cat /etc/cups/cups-credentials
--network host: Required for discovering network printers.-v /dev/bus/usb:/dev/bus/usb:ro: Grants read-only access to USB devices.--device-cgroup-rule='c 189:* rmw': Ensures USB access permissions.To build and run locally:
git clone https://github.com/rudra-iitm/cups-snap -b rudransh404
cd cups-snap
Install Rockcraft:
sudo snap install rockcraft --classic
rockcraft pack -v
sudo rockcraft.skopeo --insecure-policy copy oci-archive:<rock_image> docker-daemon:cups:latest
sudo docker run -d \
--name cups \
--network host \
-e CUPS_PORT=<CUPS_PORT> \
-e CUPS_ADMIN=<CUPS_ADMIN> \
-e CUPS_PASSWORD=<CUPS_PASSWORD> \
-v /dev/bus/usb:/dev/bus/usb:ro \
--device-cgroup-rule='c 189:* rmw' \
rudransh404/cups:latest
http://localhost:<port>/
Manage printers and jobs using the CUPS admin credentials.
sudo docker exec -u "${CUPS_ADMIN}" cups lpadmin -p <printer>
CUPS_SERVER=localhost:<CUPS_PORT> lpstat -W completed
Note: For administrative tasks, add -U <CUPS_ADMIN> to lpadmin.
cups-filters handling job processing.The cups Docker image provides a complete printing stack with CUPS, cups-filters, Ghostscript, and Poppler, supporting PostScript and PDF rendering for a wide range of printers. It offers flexible deployment for containerized systems, classic Linux replacements, or as a secure printing proxy, with robust IPP support and network discovery.
Content type
Image
Digest
sha256:de74ab5f9…
Size
139.6 MB
Last updated
over 1 year ago
docker pull rudransh404/cups