Docker for Windows does not work with Volumes

拟墨画扇 提交于 2019-12-08 09:37:11

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/38699317/docker-for-windows-does-not-work-with-volumes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!