This Mini How-to taken from GitHub - chuckcharlie/cups-avahi-airprint: Docker image for CUPS intended as an AirPrint relay and modified for purpose
Configuration
Volumes:
/config:
where the persistent printer configs will be stored
/services:
where the Avahi service files will be generated
Variables:
CUPSADMIN
the CUPS admin user you want created - default is CUPSADMIN if unspecified
CUPSPASSWORD:
the password for the CUPS admin user - default is the same value as CUPSADMIN if unspecified
TZ
is your timezone
Use the latest or version# tags to auto choose the right architecture.
Ports/Network:
2631:631
or
--net=host
Example run commands
Without Airprint functionality (tested)
podman run --replace --name cups --restart unless-stopped -p 2631:631 --device /dev/bus -v $(mktemp -d):/services:Z -v $(mktemp -d):/config:Z -e CUPSADMIN=admin -e CUPSPASSWORD=PASSWORD -e TZ="Country/City" docker.io/chuckcharlie/cups-avahi-airprint:latest
With Airprint functionality (Untested) *Please Note: Must be run on host network to support multicasting which is needed for Airprint.
podman run --replace --name cups --restart unless-stopped --net=host --device /dev/bus -v $(mktemp -d):/services:Z -v $(mktemp -d):/config:Z -e CUPSADMIN=admin -e CUPSPASSWORD=PASSWORD -e TZ="Country/City" docker.io/chuckcharlie/cups-avahi-airprint:latest
Add and set up printer:
CUPS will be configurable at https://cups.domain.tld 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.