For use the custom docker image you can clone the repo or just recreate the same files. You will need entrypoint.sh, Dockerfile and docker-compose.yaml as well.
- Clone the repo (or recreate the mentioned files)
- Once you have all the required files, do:
docker compose up -d --buildNow the cups service should be running, verify the logs:
docker logs cupsYou will notice that two directories were created:
- The first (
etc-cups) is for the cups configs and related files. - The second (
cups-spool) is for save the spool (or the "jobs") that you send to the server, so they don't get lose when you rebuild the image or restart the container.
First of all, make sure that you have your printer physically connected to your server via USB, verify if is recognized by the host with:
lsusbAnd also by the cups container:
docker exec -it cups lsusbGo to the CUPS GUI page in your browser, the URL could be: http:localhost:631, or https://your-server-ip:631 if you are on a remote machine - or https://your-domain.com if you are behind a proxy.
- Once in CUPS GUI, go to
admistrationand enter the username and password that you used in the docker compose file. - Click on
"Add printer", you should see you printer there, select it. - In the next screen you will have three fields, you can fill them with whatever you want, but I recommend to use your printer name in the "Name" field, usually the first two field are auto-filled - and MAKE SURE to activate the "Sharing" (share this printer) option, if not you don't will be able to use the printer from other devices.
- Then, you will have to choose the driver for the printer, in this case we are using EPSON, so, select that option, search for your printer model, and click
"Add Printer". - Choose the type of paper, and you preferred options.
Is basically the same as the setup, but:
- When cliking in
"Add printer", if you are not using avahi, or you have problems with auto-discovery, you will need to add the printer manually - Select the option that says:Internet Printing Protocol (ipp)and enter your URI in theconnectionfield.
Example URIs: (Replace with your printer name - The same that you utilized in the setup on step 3)
ipp://<Your-server-ip>:631/printers/EPSON_L4260_Series
http://<Your-server-ip>:631/printers/EPSON_L4260_Series
https://<Domain_name>/printers/EPSON_L4260_Series
-
In the step 4, when selecting drivers, make sure to select "IPP Everywhere".
-
Repeat all on every client.