Skip to content

feat(oci): add multi-stage Containerfile, systemd Quadlet, and CI smoke test - #32

Open
AdeshDeshmukh wants to merge 2 commits into
OpenPrinting:masterfrom
AdeshDeshmukh:feature/cloud-native-oci
Open

AdeshDeshmukh wants to merge 2 commits into
OpenPrinting:masterfrom
AdeshDeshmukh:feature/cloud-native-oci

Conversation

@AdeshDeshmukh

Copy link
Copy Markdown
Contributor

Summary

This PR introduces Cloud-Native OCI container packaging and systemd Quadlet integration for the Ghostscript Printer Application, enabling turnkey deployment on immutable Linux desktops (Universal Blue / Bluefin, Bazzite, Fedora Silverblue) and containerized servers.

This follows the OCI container packaging standard established in ps-printer-app (PR #43).

Key Architectural Highlights

  1. Multi-Stage Containerfile:

    • Builder: Compiles against upstream libcups (3.x), pappl (v1.4.x stable branch), pdfio, libcupsfilters, libppd, and pappl-retrofit, bundling Ghostscript rasterizer drivers. Includes fastestmirror=True and max_parallel_downloads=10 for resilient DNF downloads.
    • Runtime: Based on minimal quay.io/fedora/fedora-minimal:41, running rootless as unprivileged user 1001:lp.
  2. Systemd Quadlet Integration (packaging/quadlet/ghostscript-printer-app.container):

    • Declarative systemd unit managed natively by Podman.
    • Mounts /run/dbus/system_bus_socket:ro so PAPPL can register DNS-SD/mDNS services directly with the host's Avahi daemon without daemon collisions.
    • Binds host network (Network=host) and drops all Linux capabilities (DropCapability=ALL) for least privilege.
    • Persistent volume mounts for data and spool directories.
  3. CI Build & Smoke Test Workflow (.github/workflows/oci-container.yml):

    • Automated GitHub Actions workflow using Docker Buildx.
    • Executes an automated smoke test verifying daemon startup and HTTP 200 OK on port 8000.
  4. Documentation (README.md):

    • Step-by-step instructions for Quadlet deployment, rootless Podman execution (--cap-drop=ALL), local image tag overrides, and AppArmor guidance for Debian/Ubuntu/Mint Docker hosts.

Verification

Pre-tested on GitHub Actions cloud runners (Run #45367416766):

  • Multi-stage image build: Passed (1m 12s)
  • Smoke test HTTP response: HTTP/1.1 200 OK (Server: Ghostscript_Printer_Application/1.0 PAPPL/1.4.13 CUPS IPP/2.0)
  • Upstream C source diff: 0 lines changed (pure packaging addition).

Copilot AI balanced review requested due to automatic review settings November 24, 2026 13:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants