Skip to content

Commit 1679d7c

Browse files
committed
Replace nonexistent linuxserver/cups with custom Dockerfile
Builds from debian:bookworm-slim with cups, cups-filters, ghostscript, imagemagick, foomatic, gutenprint, hplip, dymo, splix, and more. Removes PUID/PGID env vars (not applicable to a plain Debian image). Made-with: Cursor
1 parent 7933a43 commit 1679d7c

4 files changed

Lines changed: 66 additions & 24 deletions

File tree

apps/cups/.env.example

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
# UID/GID the CUPS process runs as inside the container.
2-
# Match the host user that owns ../../lib/cups if you care about file permissions.
3-
PUID=1000
4-
PGID=1000
5-
6-
TZ=America/Los_Angeles
7-
1+
# Image tag to use when building/pulling (default: latest)
82
#IMAGE_VERSION=latest

apps/cups/Dockerfile

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
FROM debian:bookworm-slim
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
# Core print server
5+
cups \
6+
cups-client \
7+
# Filter pipeline: PDF, PostScript, raster, text
8+
cups-filters \
9+
cups-browsed \
10+
# PostScript / PDF rendering
11+
ghostscript \
12+
# PDF utilities
13+
poppler-utils \
14+
qpdf \
15+
# Image conversion (TIFF, PNG, JPEG, BMP, …)
16+
imagemagick \
17+
# CUPS raster image library
18+
libcupsimage2t64 \
19+
# Generic printer driver database + filter
20+
foomatic-db \
21+
foomatic-db-engine \
22+
foomatic-db-compressed-ppds \
23+
# High-quality open-source raster drivers (Epson, Canon, etc.)
24+
printer-driver-gutenprint \
25+
# HP printers
26+
hplip \
27+
# Brother / generic PCL
28+
printer-driver-foo2zjs \
29+
# Dymo label printers
30+
printer-driver-dymo \
31+
# PostScript-capable printers (pxljr, etc.)
32+
printer-driver-pxljr \
33+
# m2300w / m3300mfp
34+
printer-driver-m2300w \
35+
# SpliX (Samsung/Xerox SPL-II raster)
36+
printer-driver-splix \
37+
# Healthcheck / debug
38+
curl \
39+
&& rm -rf /var/lib/apt/lists/*
40+
41+
# Directories CUPS expects at runtime
42+
RUN mkdir -p \
43+
/var/spool/cups/tmp \
44+
/var/log/cups \
45+
/run/cups \
46+
/usr/share/cups/model/custom
47+
48+
# Run CUPS in the foreground (-f) so Docker captures stdout/stderr
49+
EXPOSE 631
50+
51+
CMD ["/usr/sbin/cupsd", "-f"]

apps/cups/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
# cups
22

3-
Containerised CUPS print server using the
4-
[LinuxServer CUPS image](https://docs.linuxserver.io/images/docker-cups/),
5-
which ships with a comprehensive set of print filters and supporting programs:
3+
Containerised CUPS print server built from a Debian Bookworm base with a
4+
comprehensive set of print filters and drivers installed:
65

76
| Package | Purpose |
87
|---|---|
9-
| `cups` | Core print server and IPP listener |
10-
| `cups-filters` | PDF, PostScript, raster, and text filter chain |
8+
| `cups` + `cups-client` | Core print server and IPP listener |
9+
| `cups-filters` + `cups-browsed` | PDF, PostScript, raster, and text filter chain |
1110
| `ghostscript` | PS/PDF rendering |
1211
| `poppler-utils` | PDF inspection and conversion |
1312
| `qpdf` | PDF linearisation and repair |
1413
| `imagemagick` | Image format conversion (PNG, JPEG, TIFF, …) |
15-
| `foomatic-db` + `foomatic-db-engine` | Generic printer driver database |
16-
| `printer-driver-gutenprint` | High-quality open-source raster drivers |
17-
| `hplip` | HP printer drivers |
1814
| `libcupsimage2t64` | CUPS raster image library |
15+
| `foomatic-db` + `foomatic-db-engine` + `foomatic-db-compressed-ppds` | Generic printer driver database |
16+
| `printer-driver-gutenprint` | High-quality open-source raster drivers (Epson, Canon, etc.) |
17+
| `hplip` | HP printer drivers |
18+
| `printer-driver-foo2zjs` | Brother / generic PCL drivers |
19+
| `printer-driver-dymo` | Dymo label printers |
20+
| `printer-driver-splix` | Samsung / Xerox SPL-II raster |
21+
| `printer-driver-pxljr` | PostScript-capable PCL drivers |
1922

2023
## Networks
2124

@@ -48,13 +51,10 @@ cp /path/to/Printer80.ppd apps/cups/ppds/
4851
## First-time setup
4952

5053
```sh
51-
cp .env.example .env
52-
# Edit .env if you need non-default PUID/PGID or TZ
53-
5454
cp config/cupsd.conf.default config/cupsd.conf
5555
# Edit config/cupsd.conf if you need to restrict or expand access
5656

57-
docker compose up -d
57+
docker compose up -d --build
5858
```
5959

6060
The CUPS web UI is available at `http://cups:631` from other containers on

apps/cups/docker-compose.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
services:
22
cups:
3-
image: lscr.io/linuxserver/cups:${IMAGE_VERSION:-latest}
3+
build: .
4+
image: cups:${IMAGE_VERSION:-latest}
45
container_name: cups
56
hostname: cups
67
restart: unless-stopped
7-
environment:
8-
PUID: ${PUID:-1000}
9-
PGID: ${PGID:-1000}
10-
TZ: ${TZ:-America/Los_Angeles}
118
volumes:
129
- ../../lib/cups:/config
1310
- ./config/cupsd.conf:/etc/cups/cupsd.conf:ro

0 commit comments

Comments
 (0)