Skip to content

CXDezign/docker-cups

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

114 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Docker CUPS

Description

Run Dockerised Printer server to share USB printers over the network.
Built to be used with Raspberry Pi's.
Tested and confirmed to be working on:

  • Raspberry Pi 5 (arm64/AArch64)

Usage

  1. Clone this repository:
git clone https://github.com/CXDezign/docker-cups.git
  1. Build the Docker image:
docker build -t docker-cups .
  1. Create a docker-compose.yml file with the following content, adjusting parameters as needed:
services:
    cups:
        container_name: cups
        image: docker-cups
        restart: unless-stopped
        ports:
            - 631:631
        volumes:
            - /etc/cups:/etc/cups
        devices:
            - /dev/bus/usb:/dev/bus/usb
        environment:
            - USERNAME="username"
            - PASSWORD="password"
            - TIMEZONE="Europe/Warsaw"
  1. Use Docker Compose to run the Docker image in a container.
docker-compose up -d

Configuration

Configure the docker-compose.yml file accordingly.

Parameter Default Description
container_name cups Preferred Docker container name.
ports 631 CUPS network port.
volumes /etc/cups Persistent Docker volume for configuration files (Persistence, migration, or backup purposes).
devices /dev/bus/usb:/dev/bus/usb Add host device (USB printer) to container. Default passes the whole USB bus in case the USB port on your device to a fixed USB port if it will remain unchanged, example: /dev/bus/usb/001/005.
USERNAME username Environment username.
PASSWORD password Environment password.
TIMEZONE Europe/Warsaw Environment timezone. Use your preferred TZ identifier.

Access

CUPS web app is accessible on the defined port of the host machine.

http://<DOCKER_HOST_IP>:631

About

Dockerised Print (CUPS) Server

Resources

Stars

Watchers

Forks

Contributors