geoffh1977 / docker-airprint

CUPS Airprint Container
GNU General Public License v3.0
0 stars 0 forks source link

Unable to find image 'cups-airprint:latest' locally #1

Open tonyblue2 opened 5 years ago

tonyblue2 commented 5 years ago

Hello,

I installed docker-airprint on a new Ubuntu 18.04.2 LTS (Proxmox LXC-Container).

git clone https://github.com/geoffh1977/docker-airprint.git cd docker-airprint/ make build

But after starting the container I get the error-message:

docker run --rm --name CupsAirprint -e CUPSADMIN=cupsadmin -e CUPSPASSWORD=cupspassword -v /mnt/tank/docker/cups-airprint/config:/config -v /etc/avahi/services:/services -p 631:631 cups-airprint Unable to find image 'cups-airprint:latest' locally docker: Error response from daemon: pull access denied for cups-airprint, repository does not exist or may require 'docker login'. See 'docker run --help'.

I am not a docker specialist. How can I solve the problem?

Thank you!

Tony

geoffh1977 commented 5 years ago

Tony,

A couple of things to note with the commad you are running (and the docker run command in general).

The part of the command with "-v" maps the local drive location to a location in the container when it is run. The path "/mnt/tank/docker/cups-airprint/config" is the path on my server when I run the command - this should be changed for your system. For example, if the config was in the current path, you could run $(pwd):/config - which would map the current path to the config directory within the container.

Also, if my memory is correct, the name of the container has changed. Rather then being "cups-airprint", I'm fairly certain it will be "geoffh1977/airprint" as per the config.yml settings. The ":latest" part is optional as by default, docker sets this to "latest" anyway. If it was a specific version, it would be ":1.0.0" for example.

Again, be aware that you don't need to run "make build" to create this container. I keep a copy of the container image available on docker hub. If you simply execute the docker command and the container image isn't on your system it should automatically download for you, no make build required.

Hope this helps you out. Let me know if you need further details.

Geoffrey

tonyblue2 commented 5 years ago

Hello Geoffrey,

thank you for your answer.

I made a new try:

docker run --rm --name CupsAirprint -e CUPSADMIN=cupsadmin -e CUPSPASSWORD=cupspassword -v $(pwd):/config -v /etc/avahi/services:/services -p 631:631 geoffh1977/airprint Unable to find image 'geoffh1977/airprint:latest' locally latest: Pulling from geoffh1977/airprint f476d66f5408: Pull complete 8882c27f669e: Pull complete d9af21273955: Pull complete f5029279ec12: Pull complete 9917c8134daf: Pull complete d674e2b42adc: Pull complete cf14d61ce391: Pull complete 38c525d1b60a: Pull complete 6a43baf25fa5: Pull complete 70c2175b052d: Pull complete Digest: sha256:cad775dd13ed72dfc48bf8d28d88bdb0394175e4a3bcad7d2e7fadc33259acc0 Status: Downloaded newer image for geoffh1977/airprint:latest

From here the container unfortunately remains. I can no longer make any further entries in the terminal.

Cups is running. I can access it on port 631 and install a printer to work. Unfortunately the printer is not found under ios on the iPhone.

Could you help me one more?

Thank you!

geoffh1977 commented 4 years ago

The magic in letting the iPhone/iPad see the Cups setup in Avahi. There are 2 ways to get this working if memory serves:

  1. Ensure the Avahi service is configured on the host and the config file is set to the right location in the Docker command line.
  2. Add the "--net host" switch to Docker. This will give the container full access to the server network card (which is required for Avahi to work from inside the container).

Also, if the container gets stuck while testing, you can always open a 2nd terminal and issue "docker rm -f " to kill off the container.

Hope this helps.

On Tue, 9 Jul 2019 at 07:57, tonyblue2 notifications@github.com wrote:

Hello Geoffrey,

thank you for your answer.

I made a new try:

docker run --rm --name CupsAirprint -e CUPSADMIN=cupsadmin -e CUPSPASSWORD=cupspassword -v $(pwd):/config -v /etc/avahi/services:/services -p 631:631 geoffh1977/airprint Unable to find image 'geoffh1977/airprint:latest' locally latest: Pulling from geoffh1977/airprint f476d66f5408: Pull complete 8882c27f669e: Pull complete d9af21273955: Pull complete f5029279ec12: Pull complete 9917c8134daf: Pull complete d674e2b42adc: Pull complete cf14d61ce391: Pull complete 38c525d1b60a: Pull complete 6a43baf25fa5: Pull complete 70c2175b052d: Pull complete Digest: sha256:cad775dd13ed72dfc48bf8d28d88bdb0394175e4a3bcad7d2e7fadc33259acc0 Status: Downloaded newer image for geoffh1977/airprint:latest

  • grep -ci cupsadmin /etc/shadow

  • [ 0 -eq 0 ]

  • useradd -r -G lpadmin -M cupsadmin

  • echo cupsadmin:cupspassword

  • chpasswd

  • mkdir -p /config/ppd

  • mkdir -p /services

  • rm -rf /etc/cups/ppd

  • ln -s /config/ppd /etc/cups

  • [ ! -f /config/printers.conf ]

  • touch /config/printers.conf

  • cp /config/printers.conf /etc/cups/printers.conf

  • /etc/init.d/dbus start

  • Starting system message bus dbus

  • /etc/init.d/avahi-daemon start ...done.

  • Starting Avahi mDNS/DNS-SD Daemon avahi-daemon ...done.

  • exec /usr/sbin/cupsd -f

  • /opt/airprint/printer-update.sh Setting up watches. Watches established.

From here the container unfortunately remains. I can no longer make any further entries in the terminal.

Cups is running. I can access it on port 631 and install a printer to work. Unfortunately the printer is not found under ios on the iPhone.

Could you help me one more?

Thank you!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/geoffh1977/docker-airprint/issues/1?email_source=notifications&email_token=ADRR372GO4B6622LVC5SBWDP6OZ4PA5CNFSM4H6VROCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZOPA6I#issuecomment-509407353, or mute the thread https://github.com/notifications/unsubscribe-auth/ADRR376K2XK62VMEQY2PXX3P6OZ4PANCNFSM4H6VROCA .