mirror of
https://github.com/nikdoof/cups-avahi-airprint.git
synced 2025-12-10 16:32:20 +00:00
master
cups-avahi-airprint
Fork from chuckcharlie/cups-avahi-airprint, which was a fork of quadportnick/docker-cups-airprint
Aims of this fork
- Reduce the image size - At the moment all build deps are included in the final image
- Make the container work nicer in Kubernetes installations
- Allow for further configuration customization (device name, description)
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 unspecifiedCUPSPASSWORD: the password for the CUPS admin user - default is the same value asCUPSADMINif unspecified
Ports/Network:
- Must be run on host network. This is required to support multicasting which is needed for Airprint.
Example run command:
docker run --name cups --restart unless-stopped --net host\
-v <your services dir>:/services \
-v <your config dir>:/config \
-e CUPSADMIN="<username>" \
-e CUPSPASSWORD="<password>" \
chuckcharlie/cups-avahi-airprint:latest
Example docker compose config:
version: '3.5'
services:
cups:
image: chuckcharlie/cups-avahi-airprint:latest
container_name: cups
network_mode: host
volumes:
- </your/services/dir>:/services
- </your/config/dir>:/config
environment:
CUPSADMIN: "<YourAdminUsername>"
CUPSPASSWORD: "<YourPassword>"
restart: unless-stopped
Add and set up printer:
- CUPS will be configurable at http://[host ip]:631 using the CUPSADMIN/CUPSPASSWORD.
- Make sure you select
Share This Printerwhen 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.
Languages
Python
69.7%
Dockerfile
15.5%
Shell
14.8%