feat: Add Docker Support and GHCR Publish Workflow#537
feat: Add Docker Support and GHCR Publish Workflow#537FNGarvin wants to merge 5 commits intoBreakthrough:mainfrom
Conversation
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: [ "main", "fng-infra-docker-ci" ] |
There was a problem hiding this comment.
Should this be updated before merging? Should we include release branches here?
There was a problem hiding this comment.
I required the dispatch to run on demand and used the feature branch trigger to test utility. If you merge into main (the target of the PR), then the old trigger is naturally useless but not harmful.
Should this be updated before merging?
No, I don't think so. The current configuration is functional.
Should we include release branches here?
You are right to adapt it to your vision for trigger behavior, but I don't know what that vision is. I inferred from the extensive list of workflows already present that you had preferences, but even if you change nothing you will have the option to generate the container images on demand. What you change beyond that is naturally your prerogative.
There was a problem hiding this comment.
Security, same as the jinja bump. User could provide, eg, "; console.log(process.env); //"
Dockerfile
Outdated
| @@ -0,0 +1,33 @@ | |||
| # Containerfile for PySceneDetect | |||
| # Copyright (C) 2026 FNGarvin. All rights reserved. | |||
There was a problem hiding this comment.
Can we change this to use the same copyright header as standard for the project? You're welcome to add a shout-out for yourself in the changelog or the docs somewhere, but the project license and copyright needs to be retained for all commits to this repo.
There was a problem hiding this comment.
Sorry, environment setup that bled through. Not at all intentional, just unnoticed.
Thanks for your great project. It has become the gold standard for a reason.
Description:
This PR adds official containerization support to PySceneDetect. It provides a reproducible environment via a multi-stage Dockerfile and an automated CI pipeline for publishing images to the GitHub Container Registry (GHCR).
Technical Highlights:
Implementation Notes:
Note on platform.py:
During development, several shell=True subprocess calls were identified as potential injection vectors. I have elected to leave these as-is for this PR to avoid cross-platform regressions, but I recommend a dedicated audit/refactor as a follow-up.
Once merged,
docker run --rm ghcr.io/breakthrough/pyscenedetectshould allow full use of the tool as an appliance, without concern over installing depedndencies.Here's the output of the package produced by my feature branch, as example:
And a more useful example, mounting a local dir into the container for i/o:
Summary by Sourcery:
Reviewer's Guide
Adds a production-ready Dockerfile and .dockerignore for PySceneDetect and replaces the placeholder Docker workflow with a full GHCR build/publish pipeline including provenance attestations.
Sequence diagram for Docker image build, publish, and attestation
Flow diagram for Dockerfile build stages and runtime behavior
File-Level Changes
Dockerfile.dockerignore.github/workflows/docker-publish.yml