• <i id='9M6G9'><tr id='9M6G9'><dt id='9M6G9'><q id='9M6G9'><span id='9M6G9'><b id='9M6G9'><form id='9M6G9'><ins id='9M6G9'></ins><ul id='9M6G9'></ul><sub id='9M6G9'></sub></form><legend id='9M6G9'></legend><bdo id='9M6G9'><pre id='9M6G9'><center id='9M6G9'></center></pre></bdo></b><th id='9M6G9'></th></span></q></dt></tr></i><div id='9M6G9'><tfoot id='9M6G9'></tfoot><dl id='9M6G9'><fieldset id='9M6G9'></fieldset></dl></div>

    <small id='9M6G9'></small><noframes id='9M6G9'>

      • <bdo id='9M6G9'></bdo><ul id='9M6G9'></ul>
      <legend id='9M6G9'><style id='9M6G9'><dir id='9M6G9'><q id='9M6G9'></q></dir></style></legend>
        <tfoot id='9M6G9'></tfoot>

      1. 在 Windows Server Core Docker 上安装 .NET Framework 3.5

        时间:2023-09-17

          <tbody id='GcB1c'></tbody>

      2. <i id='GcB1c'><tr id='GcB1c'><dt id='GcB1c'><q id='GcB1c'><span id='GcB1c'><b id='GcB1c'><form id='GcB1c'><ins id='GcB1c'></ins><ul id='GcB1c'></ul><sub id='GcB1c'></sub></form><legend id='GcB1c'></legend><bdo id='GcB1c'><pre id='GcB1c'><center id='GcB1c'></center></pre></bdo></b><th id='GcB1c'></th></span></q></dt></tr></i><div id='GcB1c'><tfoot id='GcB1c'></tfoot><dl id='GcB1c'><fieldset id='GcB1c'></fieldset></dl></div>
        <tfoot id='GcB1c'></tfoot>
            <bdo id='GcB1c'></bdo><ul id='GcB1c'></ul>
                  <legend id='GcB1c'><style id='GcB1c'><dir id='GcB1c'><q id='GcB1c'></q></dir></style></legend>

                • <small id='GcB1c'></small><noframes id='GcB1c'>

                  本文介绍了在 Windows Server Core Docker 上安装 .NET Framework 3.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在努力在 docker 容器上安装 .NET Framework 3.5.我已经安装了 4.5,但需要 3.5 才能运行一项服务.这是我的 Dockerfile:

                  FROM microsoft/windowsservercore外壳 ["powershell"]运行安装-WindowsFeature NET-Framework-45-ASPNET;安装-WindowsFeature Web-Asp-Net45运行 dism/online/enable-feature/featurename:NetFX3/all复制启动启动复制服务服务运行C:WindowsMicrosoft.NETFrameworkv4.0.30319installutil.exe"WCS.WindowsService.exe运行 mkdir 临时日志入口点 C:StartupsetupBatch.bat复制 ContainerApi ContainerApiRUN Remove-WebSite -Name '默认网站'运行新网站 -Name 'ContainerApi' -Port 80 -PhysicalPath 'C:ContainerApi' -ApplicationPool '.NET v4.5'曝光 80CMD ["ping", "-t", "localhost"]

                  当我尝试构建它时,它在 RUN dism

                  行给出错误<块引用>

                  错误:0x800f081f

                  找不到源文件.
                  使用源"选项指定恢复功能所需的文件的位置.有关指定源位置的详细信息,请参阅

                  1. 将 sxs.zip 文件复制到我的容器中.我使用图像的 dockerfile 复制了它.
                  2. 将文件解压到容器中的 C:sourcessxs 文件夹中.
                  3. 使用 Install-WindowsFeature powershell 命令安装该功能.

                    Install-WindowsFeature -Name NET-Framework-Features -Source C:sourcessxs -Verbose

                  希望这会有所帮助.我还发现以下博客有助于理解按需功能.https://blogs.technet.microsoft.com/askcore/2012/05/14/windows-8-and-net-framework-3-5/

                  I am struggling to install .NET Framework 3.5 on docker container. I have 4.5 installed already, but need 3.5 to run one Service. Here is my Dockerfile:

                  FROM microsoft/windowsservercore
                  SHELL ["powershell"]
                  
                  
                  RUN Install-WindowsFeature NET-Framework-45-ASPNET ;   
                      Install-WindowsFeature Web-Asp-Net45
                  
                  RUN dism /online /enable-feature /featurename:NetFX3 /all
                  
                  COPY Startup Startup
                  COPY Service Service
                  
                  
                  
                  RUN "C:WindowsMicrosoft.NETFrameworkv4.0.30319installutil.exe" WCS.WindowsService.exe
                  
                  
                  RUN mkdir TempLogs
                  
                  ENTRYPOINT C:StartupsetupBatch.bat
                  
                  COPY ContainerApi ContainerApi
                  
                  RUN Remove-WebSite -Name 'Default Web Site'  
                  RUN New-Website -Name 'ContainerApi' -Port 80   
                      -PhysicalPath 'C:ContainerApi' -ApplicationPool '.NET v4.5'
                  
                  EXPOSE 80
                  
                  CMD ["ping", "-t", "localhost"]  
                  

                  When I try to build this, it gives me error on line RUN dism

                  Error: 0x800f081f

                  The source files could not be found.
                  Use the "Source" option to specify the location of the files that are required to restore the feature. For more information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077.

                  Now, even if I run dism /online /enable-feature /featurename:NetFX3 /all inside the docker (docker exec) it will still give me the same error.

                  Anyone with any help?

                  解决方案

                  I took the following steps to resolve this issue:

                  1. Got hold of the Windows Server 2016 Core ISO file. Mounted the file on local computer.
                  2. Extracted the {mount}:/sources/sxs folder into a zip file (sxs.zip). Ensure that the .NET Framework 3.5 cab file (microsoft-windows-netfx3-ondemand-package.cab) is present in the sxs folder. In my case, this was the only file present in the sxs folder.

                  1. Copy the sxs.zip file to my container. I copied it using the dockerfile of the image.
                  2. Unzip the file to C:sourcessxs folder in the container.
                  3. Used the Install-WindowsFeature powershell command to install the feature.

                    Install-WindowsFeature -Name NET-Framework-Features -Source C:sourcessxs -Verbose
                    

                  Hope this helps. I also found the following blog useful in understanding the on-demand features. https://blogs.technet.microsoft.com/askcore/2012/05/14/windows-8-and-net-framework-3-5/

                  这篇关于在 Windows Server Core Docker 上安装 .NET Framework 3.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:无法加载共享库“libgdiplus"- Docker [带有 Aspose API 的 .NET 应用程序] 下一篇:检测地理位置是否在复杂多边形中

                  相关文章

                    <legend id='2fShb'><style id='2fShb'><dir id='2fShb'><q id='2fShb'></q></dir></style></legend>

                      <bdo id='2fShb'></bdo><ul id='2fShb'></ul>
                    <i id='2fShb'><tr id='2fShb'><dt id='2fShb'><q id='2fShb'><span id='2fShb'><b id='2fShb'><form id='2fShb'><ins id='2fShb'></ins><ul id='2fShb'></ul><sub id='2fShb'></sub></form><legend id='2fShb'></legend><bdo id='2fShb'><pre id='2fShb'><center id='2fShb'></center></pre></bdo></b><th id='2fShb'></th></span></q></dt></tr></i><div id='2fShb'><tfoot id='2fShb'></tfoot><dl id='2fShb'><fieldset id='2fShb'></fieldset></dl></div>

                      <small id='2fShb'></small><noframes id='2fShb'>

                    1. <tfoot id='2fShb'></tfoot>