none
Would it be possible to enable Windows Subsystem for Linux(WSL) on Windows container? RRS feed

  • Question

  • On my machine(Windows 10 Pro), Docker is up and running in the Windows container mode.

    I have pulled an image and 

    docker pull mcr.microsoft.com/windows/servercore:ltsc2019

    and spun up a container so far.

    docker run -it -m 3g --name ltsc2019 c4a3c8fae4b6 cmd.exe

    When I execute the following command on the container,

    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

    I get this error.

        Enable-WindowsOptionalFeature : 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.    At line:1 char:1    + Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows- ...    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~        + CategoryInfo          : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMException        + FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand

    Does this error message mean that WSL cannot be enabled or simply some components("source") are required to get this to work?
    Wednesday, December 26, 2018 1:10 AM

All replies

  • Wondering why would you want this monstrosity in a first place if you can run Linux natively without using Linux containers with -platform flag in docker CLI

    I don't think this will be even theoretically possible since installation of this feature requires reboot before you can actually install actual Linux distro.

    Wednesday, December 26, 2018 1:49 AM
  • The reason why I want to do this is that mostly because of ↓.

    https://github.com/Microsoft/opengcs/issues/145

    I need to run multiple applications that are based on both Windows and Linux.

    Although Docker Desktop allows for Windows and Linux containers to run side by side, the default memory size of 1GB for Linux containers is difficult for me to work around as many of applications(made to run on Linux servers, but can be run on Windows as they are mainly written in Scala) require more than that.

    So what I have come up with is (if possible) let the applications run in Windows containers inside WSL instead of making changes to them to run natively on Windows container.


    • Edited by d--s--- Wednesday, December 26, 2018 3:23 AM correct misspelling
    Wednesday, December 26, 2018 3:21 AM
  • Greetings,

    I think you can choose to start one Windows VM and another Linux VM to run containers. What you should do is to make sure your applications can be communicated via network.


    Sic Parvis Magna

    Wednesday, December 26, 2018 11:52 AM