Docker for Windows不适用于卷 [英] Docker for Windows does not work with Volumes

查看:173
本文介绍了Docker for Windows不适用于卷的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用ASP.NET Core,Docker for Windows和Visual Studio Docker Tools创建一个项目。



所以我创建了一个ASP.NET核心空项目,并通过上下文菜单添加Docker支持。



我的docker-compose.debug.yml如下所示:

 版本:'2'

服务:
aspnetcore_rtm_windows_docker_sample:
image:username / aspnetcore_rtm_windows_docker_sample:Debug
build:
上下文:。
dockerfile:Dockerfile.debug
环境:
- REMOTE_DEBUGGING = $ {REMOTE_DEBUGGING}
ports:
- 80:80
volumes:
- 。:/ app

当我开始:没有任何反应。浏览器返回主机未找到,Visual Studio的调试正在停止。



但是我已经调查了这个问题:如果我删除卷条目,它可以正常工作。浏览器返回Hello world,我可以调试Docker容器中的ASP.NET Core示例。



有人可以告诉我:为什么?



Docker共享驱动器处于活动状态(驱动器C)。我的项目位于C:\,而且也试图使用不同的驱动器。
任何人都有一个想法,为什么卷条目不起作用?

解决方案

一切都奏效
安装卡巴斯基后:效果相同。



所以如果你想在这种情况下开发卡巴斯基,那么这个时候。
它无助于停用保护。卸载后,它再次工作。



我已经在卡巴斯基创建了一张票。


I'm trying to create a project with ASP.NET Core, Docker 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 my: 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?

解决方案

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.

这篇关于Docker for Windows不适用于卷的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆