如何在Docker容器中安装MSIX包?部署失败问题求助
求助:如何在Docker容器中安装MSIX包?
我的操作流程
- 将PFX证书通过PowerShell安装到「受信任的根证书颁发机构」(路径:
Cert:\LocalMachine\Root) - 从网络驱动器复制MSIX包到容器本地
- 尝试安装MSIX应用(操作失败)
- 删除容器本地的MSIX包副本
Dockerfile内容
RUN powershell $pwd = ConvertTo-SecureString -String 'CeRtPaSsWoRd' -AsPlainText -Force; Import-PfxCertificate -Password $pwd -FilePath "R:/app-stream-cert.pfx" -CertStoreLocation Cert:\LocalMachine\Root \ && copy "R:/mcre-22-r2-x64.msix" "C:/&" \ && powershell Add-AppPackage -path "C:/mcre-22-r2-x64.msix" \ && del "C:/mcre-22-r2-x64.msix"
遇到的错误
Add-AppPackage : Deployment failed with HRESULT: 0x80073D19, An error occurred because a user was logged off. error 0x80073D0A: Failed to install package AnsysInc.mcre-22-r2_22.2.0.0_x64__13gfg92hgbc9g because the firewall service is not running. Ensure that the firewall service is enabled and started. NOTE: For additional information, look for [ActivityId] b9bbd738-fed5-0000-fec9-bdb9d5fed801 in the Event Log or use the command line Get-AppPackageLog -ActivityID b9bbd738-fed5-0000-fec9-bdb9d5fed801 At line:1 char:1 + Add-AppPackage -path C:/mcre-22-r2-x64.msix + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (C:\mcre-22-r2-x64.msix:String) [A dd-AppxPackage], Exception + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageMa nager.Commands.AddAppxPackageCommand
已尝试的解决方案
- 执行
powershell Start-Service -Name mpssvc尝试在容器和主机中启用防火墙服务,主机可以正常启用,但容器内无法启动 - 查阅资料得知Windows Docker容器与主机共享防火墙服务,但0x80073D0A错误仍未解决
环境信息
- Docker引擎版本:20.10.21
- 基础镜像:
mcr.microsoft.com/windows:20H2 - 主机操作系统:Win 10 Pro 10.0.19044.2251
内容的提问来源于stack exchange,提问作者jrbe228
相关产品推荐
相关产品推荐

