4

I'm trying to install ASP.Net 3.5 in my windows docker container using the below command

DISM /Online /Enable-Feature /FeatureName:NetFx3 /All 

I'm getting the below error

Deployment Image Servicing and Management tool Version: 10.0.17763.1

Image Version: 10.0.17763.615

Enabling feature(s) [==========================100.0%==========================]

Error: 1058

The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.

The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

Also i tried different powershell commands like, but no luck. Getting same error

Enable-WindowsOptionalFeature -Online -FeatureName IIS-ASPNET

Anyone faced this issue, Any workaround or solution?

Mathiyazhagan
  • 1,389
  • 3
  • 13
  • 37
  • 1
    .NET 30 source is not shipped with windows container image and hence you'd need to get installation mapped into container (https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/enable-net-framework-35-by-using-windows-powershell) – Gregory Suvalian Jul 23 '19 at 20:21
  • Thanks for the answer Gregory Suvalian. In the above link says we need to install .net 3.5 from shared network path. Can this be a docker C drive? and what files needs to be copied under \sources\sxs? (Iss it dotNetFx35setup.exe or something else). I copied this file folder to c\sources folder of docker and using this command RUN dism /online /enable-feature /featurename:NetFX3 /all /Source:C:\Sources /LimitAccess but still im getting error "The source files could not be found." – Mathiyazhagan Jul 24 '19 at 05:40
  • You need full installation of Windows 2016/2019 to copy those files into container first and then install it – Gregory Suvalian Jul 24 '19 at 19:07
  • @Mathiyazhagan did you found a solution for that problem? – feitzi May 26 '20 at 08:52

1 Answers1

3

Answered in https://superuser.com/questions/1498853/cannot-install-windows-feature-net-framework-features-in-docker-image

Example (using mcr.microsoft.com/windows:1809):

PS> Set-Service -Name wuauserv -StartupType Manual
PS> DISM /Online /Enable-Feature:NetFx3 /All

Deployment Image Servicing and Management tool
Version: 10.0.17763.1282

Image Version: 10.0.17763.1457

Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.
Iron Bishop
  • 1,749
  • 1
  • 7
  • 16