Applications, like Plex Media Server, rely on the Media Foundation Platform for access to codecs, hardware devices, and DirectX Video Acceleration. Media Foundation is built into consumer versions of Windows, but is an optional bolt on for Windows Server for obvious attack surface/footprint reasons.
Installing MF in optional environments like Server Core is typically easy enough. A simple
PS> Install-WindowsFeature, a reboot, and you're done. Container authors, however, will struggle with Media Foundation for several reasons:
- Media Foundation packaging is marked with 'reboot required' metadata
- Component Based Servicing (CBS) respects this metadata and goes down the path of configuring the system for pending service operations (e.g. \WinSxS\pending.xml) to run at power on/off
- Of course, servicing the base image isn't a supported scenario, so the components involved (
poqexec.exe) fail (e.g.
Windows::Rtl::TxfLogExpander::GetCurrentContainerCountMax) and CBS never gets to finish
The Media Foundation package authors clearly had a reason to mark this package as "reboot required" but that may have been before the advent of containers and the minimal subsystem within.
If you want to experiment with the Media Foundation Platform package in a container (unsupported), you will need to modify the package metadata to not require a reboot prior to installing the package.
Here's a contrived PowerShell example you can execute in your Dockerfile:
Get-ChildItem "$Env:SystemRoot\Servicing\Packages\*Media*.mum" |
(Get-Content $_) -replace 'required','no' | Set-Content $_
If you prefer to be explicit (recommended), you'll want to patch up:
Feel free to reach out if you run into any other snags. You can find me in the Windows Containers forum on MSDN or contact me using the links on the blog.