Search code examples
dockervisual-studio-2015docker-composedocker-for-windowsdocker-desktop

Docker for Windows does not work with Volumes


I'm trying to create a project with ASP.NET Core, Docker Desktop for Windows and Visual Studio Docker Tools.

So I've create a ASP.NET Core Empty Project and added Docker Support via context menu.

My docker-compose.debug.yml looks like this:

version: '2'

services:
  aspnetcore_rtm_windows_docker_sample:
image: username/aspnetcore_rtm_windows_docker_sample:Debug
build:
  context: .
  dockerfile: Dockerfile.debug
environment:
  - REMOTE_DEBUGGING=${REMOTE_DEBUGGING}
ports:
  - "80:80"
volumes:
  - .:/app

When I start, nothing happens. Browser returns host not found and debug of Visual Studio is stopping.

But I already have investigated the problem, if I remove the volume entry, it works fine. Browser returns Hello world and I can debug the ASP.NET Core sample inside the docker container.

Can somebody tell me why?

Docker Shared Drive is active (drive C:\). My project is located unter C:\ and also tried to use a different drive. Anybody has an idea, why the volume entry is not working?


Solution

  • After a clean install of my Windows, everything works now. After installing Kaspersky: the same effect.

    So dont use Kaspersky if u wanna develop in this scenario at this moment. It does not help do deactivate the protection. After uninstallation it works again.

    I already have created a ticket at Kaspersky.