GitHub Actions Windows Runtime - Linux Container Mode Docker

Hi there,

While working on the following issue, we encountered a small problem. We are running a GiHub action on ubuntu-latest (windows-2019). However we need to run Docker within this windows runner but in Linux Container mode. It seems by default Docker runs on Windows container mode. Is there any way of doing this?



You can try this:

& $Env:ProgramFiles\Docker\Docker\DockerCli.exe -SwitchDaemon

More details, you can reference to this topic:

1 Like

@brightran: Thanks much for the response; but it seems that when I try to run that it gives me the following error;

Run & $Env:ProgramFiles\Docker\Docker\DockerCli.exe -SwitchDaemon
& : The term 'C:\Program Files\Docker\Docker\DockerCli.exe' is not recognized as the name of a cmdlet, function, 
script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is 
correct and try again.
At D:\a\_temp\d38dac67-e8c7-41bc-8f8b-f1d8788dfd5b.ps1:2 char:3
+ & $Env:ProgramFiles\Docker\Docker\DockerCli.exe -SwitchDaemon
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Program File...r\DockerCli.exe:String) [], ParentContainsErrorRecord 
    + FullyQualifiedErrorId : CommandNotFoundException

I think there does not exist DockerCli.exe in these VMs. :frowning: Here’s the link to the CI run;

The Windows VMs are not enabled for nested virtualization so you won’t be able to run a linux container on the Windows VM. We will not be able to enable that feature due to the VMs already being nested on level deep and they hypervisor does not support multiple levels of nested virtualization.

1 Like

@chrispat : Thanks much for the information. Appreciate it. :+1: