feat: harden Docker image builds and publishing#3205
Open
knylbyte wants to merge 7 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR replaces the legacy Docker publishing workflow with a hardened, multi-platform (amd64/arm64) build + publish pipeline, and introduces an immutable iptv-org/api:gh-pages snapshot mechanism so every platform build uses identical API data.
Changes:
- Add an API snapshot downloader/verifier (
docker/api-snapshot.mjs) and wire it into the Docker build (local fallback + CI-provided snapshot build context). - Replace the old Docker publishing workflow with a new pipeline that builds per-platform images with scoped caches, then assembles and publishes a multi-platform OCI index + provenance verification.
- Fix boolean flag/env parsing for
--curl/--debugand add regression tests; adjust a couple of site configs/tests and tighten lint/docker ignore patterns.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/commands/epg/grab.test.ts | Adds coverage for enabling/disabling CURL and DEBUG via environment variables. |
| sites/tvpassport.com/tvpassport.com.test.js | Adds a test for empty channel list generation. |
| sites/tvpassport.com/tvpassport.com.config.js | Defers loading the French channel set to channels() execution. |
| sites/toonamiaftermath.com/toonamiaftermath.com.config.js | Switches HTTPS CA material to a dedicated CA chain file. |
| sites/toonamiaftermath.com/ca-chain.pem | Adds the CA chain used for TLS verification. |
| sites/toonamiaftermath.com/data/certificate.pem | Removes the previously embedded cert bundle. |
| scripts/commands/epg/grab.ts | Updates Commander options to correctly parse boolean env vars for curl/debug. |
| package.json | Moves dev tooling into devDependencies and expands lint scope/extensions. |
| Dockerfile | Replaces legacy alpine-based image build with snapshot-based, production-only install and non-root runtime. |
| docker/README.md | Documents the API snapshot approach for Docker builds. |
| docker/api-snapshot.mjs | Implements snapshot resolution, download, validation, checksums, and verification. |
| .husky/scripts_lint.sh | Extends staged-lint scope to include docker/**/*.mjs. |
| .github/workflows/docker-publish.yml | Removes the legacy publish workflow. |
| .github/workflows/docker-build.yml | Adds the new hardened multi-job build/publish/manifest/attestation workflow. |
| .github/workflows/check.yml | Includes docker/**/*.mjs in the “changed JS files” lint set and consolidates outputs. |
| .dockerignore | Adds a focused dockerignore for smaller build contexts/images. |
Comment on lines
+16
to
+19
| sites/**/__data__/** | ||
| sites/**/*.test.js | ||
| sites/**/*.test.ts | ||
| sites/**/*.md |
Contributor
Author
There was a problem hiding this comment.
Note: The Docker runtime image is intentionally limited to grab and serve. Files used exclusively by the maintainer command channels:parse are excluded because channel lists are generated outside the container and bundled as *.channels.xml.
knylbyte
force-pushed
the
feature/hardened-docker-image
branch
from
July 13, 2026 22:05
8131a1b to
f86cdd4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This replaces the legacy Docker publishing workflow with a hardened, multi-platform build pipeline for
linux/amd64andlinux/arm64.Changes
node:24-trixie-slimdevDependenciesnodeuser.dockerignorelatest, branch and short-SHA tagsdocker-publish.ymlworkflowAPI snapshot
The workflow now resolves
iptv-org/api:gh-pagesto an immutable commit once per run.It then:
This prevents architecture-specific images from containing different or stale API data.
An optional
api_refworkflow input allows testing a specific commit, tag or branch.Environment flags
CURL=falseandDEBUG=falseare now parsed as actual boolean values instead of enabling the corresponding options because the environment variable is present.Both command-line flags remain usable without an explicit value:
Validation
npm run lintnpm test -- tests/commands/epg/grab.test.tsactionlinthealthy