本文介绍了在Docker容器中安装Server-Media-Foundation的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Crossref:  https://www.reddit.com/r/docker/comments/57w70v/installing_servermediafoundation_windows_feature/

Crossref: https://www.reddit.com/r/docker/comments/57w70v/installing_servermediafoundation_windows_feature/

尝试在Windows Server 2016容器中安装Windows版本的Plex。我们的结果很明显: https://www.reddit.com/r/PleX/comments/5746vh/pms_installation_in_windows_server_2016_docker/

Trying to install the Windows version of Plex inside a Windows Server 2016 container. Our results thusfar:https://www.reddit.com/r/PleX/comments/5746vh/pms_installation_in_windows_server_2016_docker/


服务器和客户端:

Server and client:


版本:1.13.0-dev

Version: 1.13.0-dev


API版本:1.25

API version: 1.25


Go版本:go1.7.1

Go version: go1.7.1


Git commit:9f5ffa2

Git commit: 9f5ffa2


Windows Server 2016 RTM MSDN使用microsoft / windowsservercore作为基本映像。

Windows Server 2016 RTM MSDN Using microsoft/windowsservercore as base image.


Plex安装和文件放在正确的位置。但是,当试图运行Plex Media Server.exe时,它就会退出。互联网上的文件请注意,您需要安装Windows Core上的ServerMediaFoundation功能才能运行Plex。

Plex installs and files are placed in the correct places. However, when trying to run Plex Media Server.exe, it just quits. Docs on the internet note that you need the ServerMediaFoundation feature on Windows Core installed in order for Plex to run.


测试过:安装了Plex的2016新核心虚拟机无法运行。安装了ServerMediaFoundation功能并重新启动:Plex正常工作。

Tested this: New 2016 Core VM, Plex installed, doesn't run. Installed the ServerMediaFoundation feature and rebooted: Plex works.


我认为我们真的停留在docker容器内部安装ServerMediaFoundation功能。这些功能似乎安装并要求重启。重新启动make docker container stall。停止并重新启动容器显示
功能是   安装。


Hardcore docker,特别是在Windows上,对我来说是新的,但我会在这里猜测:功能安装是否依赖于图像修改微软/ windowsservercore映像?喜欢,它需要注入内核,它在
images / containers之间共享?

Hardcore docker, especially on Windows, is new to me but I'm going to make a wild guess here: Could the feature installation depend on image modifications of the microsoft/windowsservercore image? Like, it needs to inject into the kernel which is shared between images/containers?


简而言之:是否可以运行Dism / online / enable-feature / all / FeatureName:ServerMediaFoundation并使其工作?或者是否必须破解了Microsoft / WindowsServerCore图像(我相信EULA不允许这样做)?

In short: Is it possible to run Dism /online /enable-feature /all /FeatureName:ServerMediaFoundation and make it work? Or does one have to hack the crap out the Microsoft/WindowsServerCore image (which isn't allowed by EULA I believe)?


Dockerfile:


FROM microsoft / windowsservercore

FROM microsoft/windowsservercore


LABEL Description =" PMS"

LABEL Description="PMS"


COPY PlexInstaller.exe C:\

COPY PlexInstaller.exe C:\


COPY install-media.bat C:\

COPY install-media.bat C:\


RUN C:\ install-media.bat

RUN C:\install-media.bat


RUN PlexInstaller.exe / install / quiet

RUN PlexInstaller.exe /install /quiet


RUN del C:\ PlexInstaller.exe

RUN del C:\PlexInstaller.exe


RUN del C:\ install-media.bat

RUN del C:\install-media.bat


CMD [" cmd"]

CMD [ "cmd" ]


Install-media.bat(令人讨厌的黑客从DISM获取正确的错误代码):


Dism / online / enable-feature / FeatureName:ServerMediaFoundation / NoRestart

Dism /online /enable-feature /FeatureName:ServerMediaFoundation /NoRestart


ver> nul

ver > nul

TL; DR:Is可以在Windows Server 2016 RTM上的Microsoft / WindowsServerCore映像中安装Server-Media-Foundation功能吗?

TL;DR: Is it possible to install the Server-Media-Foundation feature inside a Microsoft/WindowsServerCore image on Windows Server 2016 RTM?

推荐答案

RUN Dism /online /enable-feature /FeatureName:... /NoRestart

一般来说,这是一个好的方法进入Dockerfile。每个RUN命令在执行下一行之前执行提交。这应该取代重新启动的需要。

In general, this is an ok way to go in a Dockerfile. Each RUN command does a commit before executing the next line. That should replace the need for a reboot.

这是一个例子:https:// github。 com / Microsoft / Virtualization-Documentation / blob / live / windows-container-samples / dotnet35 / Dockerfile

Here's an example: https://github.com/Microsoft/Virtualization-Documentation/blob/live/windows-container-samples/dotnet35/Dockerfile

就Server-Media-Foundation而言,它尚未经过测试。我没有关于它是否在容器中工作的任何信息。如果您安装了角色但是有些API失败了,请随时在此处发布其他调试详细信息,我可以看看我是否可以获得b $ b从开发者那里回来。

As far as Server-Media-Foundation goes, it hasn't been tested. I don't have any info on whether or not it works in containers. Feel free to post additional debugging details here if you have the role installed but some APIs are failing and I can see if I can get feedback on it from a developer.


这篇关于在Docker容器中安装Server-Media-Foundation的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 13:24