Forked From: znetwork/cups-avahi-airprint GitHub || DockerHub
This Ubuntu 22.04-based Docker image runs a CUPS instance that is meant as an AirPrint relay for printers that are already on the network but not AirPrint capable.
Among some other items of cleanup, this fork will install printer-driver-all
instead of a select few drivers. For more information about which drivers are included, please see the Ubuntu packages page.
It's also worth mentioning that this installs cups-PDF as well, although that's from the upstream.
Through Docker Compose:
services:
cups:
container_name: cups
image: curiouscocoon/docker-cups-pdf-airprint:latest
environment:
- CUPSADMIN=CHANGE_ME
- CUPSPASSWORD=CHANGE_ME
volumes:
- ./cups/services:/services
- ./cups/config:/config
network_mode: host
restart: unless-stopped
/config
: where the persistent printer configs will be stored/services
: where the Avahi service files will be generated/var/spool/cups-pdf/ANONYMOUS
: where cups-pdf will output prints
CUPSADMIN
: the CUPS admin user you want created - default isadmin
if unspecifiedCUPSPASSWORD
: the password for the CUPS admin user - default isadmin
username if unspecified
- Must be run on host network. This is required to support multicasting which is needed for Airprint.
- CUPS will be configurable at http://[host ip]:631 using the CUPSADMIN/CUPSPASSWORD.
- Make sure you select
Share This Printer
when configuring the printer in CUPS. - After configuring your printer, you need to close the web browser for at least 60 seconds. CUPS will not write the config files until it detects the connection is closed for as long as a minute.