A dockerized version of CUPS
This project was born to address a scenario where there are:
cups that manages printer queuesfoomatic-rip that manages the rendering phaseIf 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
Using this printer application is pretty simple. Just follow the steps below in order to make it working on your system.
docker pull drcoccodrillus/cups
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
Your custom PPDs go here /usr/share/ppd/cupsfiltersand
Your custom raster files go here /usr/lib/cups/filter
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
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
Content type
Image
Digest
sha256:decbcbe86…
Size
229.9 MB
Last updated
over 3 years ago
docker pull drcoccodrillus/cups