https://github.com/aguslr/docker-cups
Set up CUPS to share USB printers over the network
https://github.com/aguslr/docker-cups
cups cupsd docker podman
Last synced: 1 day ago
JSON representation
Set up CUPS to share USB printers over the network
- Host: GitHub
- URL: https://github.com/aguslr/docker-cups
- Owner: aguslr
- License: gpl-3.0
- Created: 2023-04-28T15:09:25.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-06-06T20:54:50.000Z (7 days ago)
- Last Synced: 2025-06-06T21:39:16.065Z (7 days ago)
- Topics: cups, cupsd, docker, podman
- Language: Dockerfile
- Homepage:
- Size: 65.4 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[aguslr/docker-cups][1]
=======================[](https://hub.docker.com/r/aguslr/cups) [](https://hub.docker.com/r/aguslr/cups)
This *Docker* image sets up *CUPS* inside a docker container.
> **[CUPS][2]** is a modular printing system for Unix-like computer operating
> systems which allows a computer to act as a print server.Installation
------------To use *docker-cups*, follow these steps:
1. Download your printer drivers in *DEB* format into a directory named
`./drivers`.2. Clone and start the container:
docker run --privileged -p 631:631 \
-e CUPS_USER=admin \
-e CUPS_PASS=admin \
-v /dev/bus/usb:/dev/bus/usb \
-v /run/dbus:/run/dbus \
-v "${PWD}"/drivers:/opt/drivers \
docker.io/aguslr/cups:latest3. Open with your web browser to access CUPS.
### Variables
The image is configured using environment variables passed at runtime. All these
variables are prefixed by `CUPS_`.| Variable | Function | Default | Required |
| :------- | :-------------------- | :------------ | -------- |
| `USER` | Username of CUPS user | `admin` | N |
| `PASS` | Password of CUPS user | autogenerated | N |To see the default autogenerated password, check the log for the container:
docker logs | grep '^Password'
Build locally
-------------Instead of pulling the image from a remote repository, you can build it locally:
1. Clone the repository:
git clone https://github.com/aguslr/docker-cups.git
2. Change into the newly created directory and use `docker-compose` to build and
launch the container:cd docker-cups && docker-compose up --build -d
[1]: https://github.com/aguslr/docker-cups
[2]: https://www.cups.org/