Web application to allow printing from network printer
1.1K
This Docker image provides a Flask web application that allows users to upload files and print them using a network printer via CUPS (Common Unix Printing System). The printer is configured via the IPP protocol (Internet Printing Protocol).
pdf, txt, jpg, jpeg, and png formats.You can pull the image from Docker Hub using the following command:
docker pull <your-dockerhub-username>/cups-flask-printer:latest
Run the container with default printer configuration:
docker run -d -p 5000:5000 <your-dockerhub-username>/cups-flask-printer
This command will:
5000.ipp://10.25.0.218/ipp/print.Once the container is running, open a web browser and navigate to:
http://localhost:5000
You can upload files through the web interface and print them to the configured network printer.
If you want to override the default printer configuration (name or IP address), you can pass environment variables to the container when starting it:
docker run -d -p 5000:5000 \
-e PRINTER_NAME="My_Printer" \
-e PRINTER_IP="192.168.1.100" \
<your-dockerhub-username>/cups-flask-printer
In this example:
The printer is automatically added to CUPS inside the container using the lpadmin command during container startup:
lpadmin -p $PRINTER_NAME -E -v ipp://$PRINTER_IP/ipp/print -m everywhere
To verify that the printer has been configured inside the container, you can use the following command:
docker exec -it <container-id> lpstat -p
This will list the available printers in the container.
10.25.0.218 by default).docker logs <container-id>
docker exec -it <container-id> lpstat -r
This project is licensed under the MIT License.
Content type
Image
Digest
sha256:2a128c5da…
Size
260 MB
Last updated
almost 2 years ago
docker pull dk2342235/web-printer