Docker Community Forums

Share and learn in the Docker community.

Unable to determine whether Docker is currently configured to run Windows or Linux containers

I face a issue when running a build task in Azure VSTS , it gives a error as below.

C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(491,5): Error : Unable to determine whether Docker is currently configured to run Windows or Linux containers. Verify that Docker is installed and running locally

But i have mentioned the, Windows in project file as well as docker-compose.dcproj file. But issue remain the same.

And i have switch docker to windows container as well.

Thanks.

It is docker-compose.dcproj file where you can set up the OS you want to target:

<DockerTargetOS>Linux</DockerTargetOS>

To switch docker daemon to the same OS you can use Docker tray icon or Docker Settings window (accessible from the same menu):
enter image description here