Sign inSign up

drcoccodrillus/cups

By drcoccodrillus

•Updated over 3 years ago

A dockerized version of CUPS

Image
0

196

drcoccodrillus/cups repository overview

⁠docker-cups

A dockerized version of CUPS

⁠Project description

This project was born to address a scenario where there are:

  • one server running cups that manages printer queues
  • one server running foomatic-rip that manages the rendering phase

If you need to setup a similar environment, you should also consider to run the foomatic-rip container https://hub.docker.com/repository/docker/drcoccodrillus/cups-filters/general⁠


⁠How to use it

Using this printer application is pretty simple. Just follow the steps below in order to make it working on your system.

⁠Download the image

docker pull drcoccodrillus/cups

⁠Start a container

You can start a working container using this docker-compose.yml

version: "3.8"

services:
  cups:
    build: .
    image: drcoccodrillus/cups:latest
    container_name: cups
    restart: always
    privileged: true
    devices:
      - /dev:/dev
    ports:
      - "8631:631"
    networks:
      printer-network:
        ipv4_address: 172.28.0.2

networks:
  printer-network:
    name: printer-network
    driver: bridge
    ipam:
      config:
        - subnet: 172.28.0.0/16
          gateway: 172.28.0.1
⁠Copy PPDs and raster files (optional)

Your custom PPDs go here /usr/share/ppd/cupsfiltersand

Your custom raster files go here /usr/lib/cups/filter

⁠Connect and configure the printer

Connect your printer and run the following commands to configure a printer queue.

docker exec cups lpinfo -v

Take note of the URI of your USB printer (for example usb://Xerox/WorkCentre%20PE114%20Series?serial=3429108682......)

docker exec cups lpadmin -p Xerox -v usb://Xerox/WorkCentre%20PE114%20Series?serial=3429108682......

docker exec cups lpadmin -p Xerox -o printer-is-shared=true

docker exec cups lpadmin -d Xerox

docker exec cups cupsenable Xerox

docker exec cups cupsaccept Xerox

⁠Use your printer

docker exec cups lp -d printer-name /test-files/test.pdf

Following the example above, the printing command would be

docker exec cups lp -d Xerox /test-files/test.pdf

Tag summary

Content type

Image

Digest

sha256:decbcbe86…

Size

229.9 MB

Last updated

over 3 years ago

docker pull drcoccodrillus/cups