ASP.NET Core docker build error

kagetoki picture kagetoki · Oct 17, 2017 · Viewed 17.2k times · Source

I'm new to ASP.NET Core and docker. I've created a simple ASP.NET Core 2.0 app and try to use docker with it on Windows. However, I get this error:

Your Docker server host is configured for 'Linux', however the docker-compose project targets 'Windows'.

Although it seems to be pretty informative error, I can't find where to 'configure host for Windows'

Answer

Pavel Agarkov picture Pavel Agarkov · Oct 17, 2017

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