我是 docker 新手,并以此为例说明如何学习。我正在尝试创建一个 dockerfile,它允许我在我的 Windows 服务器上运行 plex。在 Plex 论坛上创建的一篇很棒的帖子描述了如何使用 powershell 执行任务,因此我想看看是否可以使用这些命令创建图像。
这是我到目前为止所拥有的:
FROM microsoft/windowsservercore
RUN Get-ChildItem "$Env:SystemRoot\Servicing\Packages\*Media*.mum" | ForEach-Object { (Get-Content $_) -replace 'required','no' | Set-Content $_}
RUN Add-WindowsFeature Server-Media-Foundation;
RUN Invoke-WebRequest -OutFile Plex-Media-Server-1.12.3.4973-215c28d86.exe "https://downloads.plex.tv/plex-media-server/1.12.3.4973-215c28d86/Plex-Media-Server-1.12.3.4973-215c28d86.exe" -UseBasicParsing;
RUN .\plex.exe /quiet
RUN start 'C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Server.exe'
EXPOSE 32400/tcp
我已经删除了格式化注释。所以我有两个问题,
首先:使用 docker build -t test_plex 时,这似乎没有运行。我收到以下错误:
unable to prepare context: unable to evaluate symlinks in Dockerfile path: GetFileAttributesEx C:\Windows\System32\Dockerfile: The system cannot find the file specified.
第二:使用 PowerShell 会并行运行吗?还是有某种等待命令。
任何帮助/提示都会很棒,感谢您的宝贵时间(对不起,很长的帖子)