Code Monkey home page Code Monkey logo

docker-cups-airprint's Introduction

znetwork/cups-avahi-airprint docker-image

Working on Synology DSM 7 (!!!) and AMD64

Fork from quadportnick/docker-cups-airprint and chuckcharlie/docker-cups-airprint

This Ubuntu-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.

  • Included drivers HP, Samsung, Canon, Xerox, etc.

Easy run command (use username and password: admin/admin):

docker run --name airprint --restart unless-stopped --net host znetwork/synology-airprint:latest

Before run docker conteiner on DSM7 Synology run this commands in ssh terminal:

  • sudo synosystemctl stop cupsd
  • sudo synosystemctl stop cups-lpd
  • sudo synosystemctl stop cups-service-handler
  • sudo synosystemctl disable cupsd
  • sudo synosystemctl disable cups-lpd
  • sudo synosystemctl disable cups-service-handler

Add and setup printer:

  • 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.

After setup and testing AirPrint, you can back run on services. (maybe you will need restart nas)

  • sudo synosystemctl start cupsd
  • sudo synosystemctl start cups-lpd
  • sudo synosystemctl start cups-service-handler
  • sudo synosystemctl anable cupsd
  • sudo synosystemctl anable cups-lpd
  • sudo synosystemctl anable cups-service-handler

Manual 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 admin if unspecified
  • CUPSPASSWORD: the password for the CUPS admin user - default is admin username if unspecified

Ports/Network:

  • Must be run on host network. This is required to support multicasting which is needed for Airprint.

Example run env 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>" \
  znetwork/cups-avahi-airprint:latest

docker-cups-airprint's People

Contributors

quadportnick avatar ziwork avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

docker-cups-airprint's Issues

Missing drivers - how to update container to use CUPS 2.3.3 (instead of 2.2.2)

Although 5 years old this Airprint relay still works like a charm! I do struggle to get newer printers supported as this docker file is based on CUPS 2.2.2 which did not contain the driver of my HP Envy printer (on which Airprint should work out-of-the-box but clearly does not). I did manage to obtain ppd file for this Envy printer but then filter problems and raster issues occur. Would be great if a new docker release could be created using the latest CUPS 2.3.3

can't get it to run

my create command:

sudo docker create
--name=cups
--restart=always
--net=host
--privileged
-v /volume1/docker/AirPrint/config:/config
-v /etc/avahi/services:/services
-e CUPSADMIN="leprint"
-e CUPSPASSWORD="HellFire123!"
quadportnick/cups-airprint

logs has a loop of:

  • grep -ci leprint /etc/shadow
  • [ 0 -eq 0 ]
  • useradd -r -G lpadmin -M leprint
  • echo leprint:HellFire123!
  • chpasswd
    chpasswd: (user leprint) pam_chauthtok() failed, error:
    System error
    chpasswd: (line 1, user leprint) password not changed

I have also tried admin:password, cupsadmin:cupspass - always this loop.

what's wrong?

Add HPLIP

would it be possible to add the HPLIP Package to the container?

# apk add cups cups-libs cups-pdf cups-client cups-filters hplip

login web ui

what user name & password login web ui cups ?
I can't user user & password

  1. user : CUPSADMIN password ; CUPSPASSWORD
  2. user : root & password root

Please help me

Only Partial Page Prints when Printed via AirPrint

Greetings!

To preface this, I'm not sure if this is specifically some sort of bug within CUPS or if it is this CUPS-AirPrint code in particular, but after setting up CUPS via the docker image, I am able to print normally via my Windows desktop with no issue via CUPS, but the moment I AirPrint anything from my phone, only the top half of the page prints, but it prints on the bottom of the page. Any help or pointers here would be greatly appreciated, thank you!

Desired page
Desired page

What printed
What printed

Remove Avahi&dbus startup

Don't need it anymore since we're using that python generation script, but I neglected to remove it ^_^

/usr/lib/cups/filter

Hello
thanks for this Docker Pull i want to know if it possible to create for the cups image

-v :/usr/lib/cups/filter \ ?

to have the driver for my printer with rastertogutenprint.5.3

regards

CUPS-PDF - output location - need to have unique filename - files overwritten

Hi,
I have setup the docker container on Synology and I have selected CUPS-PDF as the printer and am able to print a PDF from windows. I have added a volume to map: docker/cups-quyadportnick/CUPS-PDF to /var/spool/cups-pdf
The file is output as: MSxpsPS__0.pdf and the PDF looks good once generated.

The issue I have found is: this filename is static, and each time I send a print job, it overwrites the file.

Is it possible to set the filename so that it does not overwrite each time?

Repository not available

Reading package lists... W: The repository 'http://security.ubuntu.com/ubuntu zesty-security Release' does not have a Release file. W: The repository 'http://archive.ubuntu.com/ubuntu zesty Release' does not have a Release file. W: The repository 'http://archive.ubuntu.com/ubuntu zesty-updates Release' does not have a Release file. W: The repository 'http://archive.ubuntu.com/ubuntu zesty-backports Release' does not have a Release file. W: The repository 'http://archive.ubuntu.com/ubuntu zesty-security Release' does not have a Release file. W: The repository 'http://us.archive.ubuntu.com/ubuntu zesty Release' does not have a Release file. W: The repository 'http://us.archive.ubuntu.com/ubuntu zesty-updates Release' does not have a Release file. E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/zesty-security/universe/source/Sources 404 Not Found [IP: 91.189.88.152 80] E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/zesty/universe/source/Sources 404 Not Found [IP: 91.189.88.161 80] E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/zesty-updates/universe/source/Sources 404 Not Found [IP: 91.189.88.161 80] E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/zesty-backports/universe/binary-amd64/Packages 404 Not Found [IP: 91.189.88.161 80] E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/zesty-security/multiverse/source/Sources 404 Not Found [IP: 91.189.88.161 80] E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/zesty/multiverse/source/Sources 404 Not Found [IP: 91.189.91.26 80] E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/zesty-updates/multiverse/source/Sources 404 Not Found [IP: 91.189.91.26 80] E: Some index files failed to download. They have been ignored, or old ones used instead.

Add `printer-driver-all` package

The printer-driver-all meta-package includes most printer drivers and removes the needs for manually adding each brand.
It includes a lot of the packages that where already added manually here, so it would also simplify the Dockerfile.

Adding it will significantly increase the image size though.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.