build: install ffmpeg in API runtime image for Userback poster frames - #8024
Merged
Conversation
The upcoming Kanban plugin feature that extracts a poster frame from
Userback video feedback shells out to ffmpeg:
ffmpeg -y -i <in> -frames:v 1 -f image2 <out.png>
The runtime stage (mcr.microsoft.com/dotnet/aspnet:10.0-noble) ships no
ffmpeg, so Process.Start("ffmpeg") would throw
Win32Exception: No such file or directory in production.
Installed in the runtime stage only, with --no-install-recommends and an
apt-lists cleanup: 197 packages, ~416 MB uncompressed / ~149 MB
compressed. The recommends set would add another ~260 MB of VA-API/VDPAU
drivers and speech models that frame extraction does not need.
The apt block sits above the ARG/ENV DISABLE_SENTRY pair so a differing
DISABLE_SENTRY value cannot invalidate it (dotnet-core-pr.yml passes
DISABLE_SENTRY=true, dotnet-core-master.yml passes it not at all). This
helps local and self-hosted rebuilds only: neither workflow configures
buildx or a registry cache and GitHub runners are ephemeral, so CI gets
no layer reuse either way and pays the ~50s apt cost on every build.
Required by microting/eform-kanban-plugin#8. Plugin CI pins this repo's
stable branch, so this must merge first.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015sXLtgzZU8QL9m84GqMkoJ
There was a problem hiding this comment.
🟢 Approval recommended
The change is small and targeted, and the remaining feedback is an optimization suggestion rather than a functional blocker.
Pull request overview
This PR updates the platform’s API runtime container image to include ffmpeg so the Kanban plugin can extract poster-frame thumbnails from Userback video feedback at runtime.
Changes:
- Install
ffmpegin themcr.microsoft.com/dotnet/aspnet:10.0-nobleruntime stage viaapt-get. - Clean apt package lists after install to reduce leftover metadata in the final image.
File summaries
| File | Description |
|---|---|
| Dockerfile | Adds ffmpeg installation to the runtime image to enable poster-frame extraction for Userback video feedback. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+30
to
+32
| RUN apt-get update \ | ||
| && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ffmpeg \ | ||
| && rm -rf /var/lib/apt/lists/* |
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.
Why
microting/eform-kanban-plugin#8 extracts a poster frame from Userback video feedback by shelling out to:
The runtime stage (
mcr.microsoft.com/dotnet/aspnet:10.0-noble) ships no ffmpeg, soProcess.Start("ffmpeg")would throwWin32Exception: No such file or directoryin production. 889 imported Kanban cards currently show no thumbnail, because their feedback is screen recordings rather than screenshots.This must merge before the Kanban plugin work — plugin CI pins this repo's
stablebranch, so the plugin build compiles against whatever is onstable.Size impact
Stated plainly, because this is the runtime image that hosts the whole platform:
--no-install-recommendsalready saves ~260 MB by dropping the VA-API/VDPAU driver stack and pocketsphinx speech models, none of which single-frame extraction needs.ffmpeghard-depends onlibsdl2-2.0-0, so the display/audio stack comes along regardless.CI artifact cost
Both
dotnet-core-pr.ymlanddotnet-core-master.ymldocker savethe image tocontainer.tarand upload it; 10 Playwright shards then each download it. That is roughly +1.5 GB of extra artifact egress per run.The
container.tarupload has noretention-daysset, so it inherits the repo default. Addingretention-days: 1to that one artifact would be a cheap mitigation — left as a follow-up rather than mixed into this change.Layer ordering
The apt block is placed above the
ARG/ENV DISABLE_SENTRYpair.dotnet-core-pr.ymlpasses--build-arg DISABLE_SENTRY=truewhiledotnet-core-master.ymlpasses it not at all, and layer cache is strictly sequential — a differingENVvalue above the apt layer would invalidate it.To be clear about the actual benefit: neither workflow configures buildx or a registry cache, and GitHub runners are ephemeral, so CI gets no layer reuse either way and pays the ~50s apt cost on every build. The ordering fix helps local and self-hosted rebuilds only.
Deliberately unpinned version
No version pin on
ffmpeg, consistent with the repo's other apt installs. On an Ubuntu LTS base this is also the correct choice: a pin breaks the build the moment a security update supersedes the pinned version and it leaves the archive. Noble stays on ffmpeg 6.1.x with backported fixes.Follow-ups explicitly out of scope
.github/dependabot.ymldeclares onlynugetandnpmecosystems — nodocker— and there is no Trivy/Snyk step in any workflow. An ffmpeg CVE would therefore be silent. Worth adding separately; adding it in this PR would surface a large pre-existing backlog unrelated to this change.securityContext: {}in the helm chart. Pre-existing, but ffmpeg parsing untrusted user-uploaded video widens what that means.Not changed:
Dockerfile-bigLeft alone on purpose. It is referenced only by
.github/copilot-instructions.md— no workflow, script, or compose file builds it — and it is visibly stale (node:18.12.1, libreoffice). Adding ffmpeg there would be maintaining a file nothing builds.Diff
🤖 Generated with Claude Code
https://claude.ai/code/session_015sXLtgzZU8QL9m84GqMkoJ