VS 2017和Docker:操作中止 [英] VS 2017 and Docker: Operation aborted
问题描述
我该如何调试?唯一的其他问题与解答我发现并没有帮助。如果您识别出该错误,您知道如何解决吗?
我遇到了同样的问题。我发现了这个论坛帖子,提示修复方法是:
- 重置Docker共享驱动器设置上的凭据
- 删除[陈旧] microsoft / aspnetcore:2.0映像,然后再次从DockerHub中获取最新版本
第一个建议做了对我不起作用,但是第二个对我有用。我可能不需要这样做,但是我也为正在从事的项目删除了现有的容器和图像。
带有Docker支持的Visual Studio构建过程如果在本地找不到该映像,则启用后将自动拉microsoft / aspnetcore:2.0。因此,最简单的方法是删除缓存的图像,然后让构建过程为您拉取图像。
为了查看本地图像,请从命令行:
docker images
如果您看到microsoft / aspnetcore:2.0,则从本地缓存中删除映像:
docker rmi microsoft / aspnetcore:2.0
此后,当您进行下一次构建时...一切都很好。
.Net Core 2 came out, so I updated Visual Studio 2017 (Community) to release 15.3.0 (and subsequently 15.3.2) which has support for Docker which I've installed on my machine (Windows 10), and I believe I've configured things correctly.
I created a basic Web API project—on .NET Core 2.0 without Docker—and that works. Now I add Docker support and I can't get it to run! I get the following error:
How do I debug this? The only other Q&A I found wasn't helpful. If you recognize the error, do you know how to fix it?
I was having the same issue. I found this forum post which suggests the fix is either:
- Reset the credentials on the shared drive settings for Docker
- Delete the [stale] microsoft/aspnetcore:2.0 image and pull the latest again from DockerHub
The first suggestion did not work for me, but the second did. I probably didn't need to do this, but I also nuked my existing containers and images for the project I was working on.
The Visual Studio build process with Docker support enabled will automatically pull microsoft/aspnetcore:2.0 if the image is not found locally. So, it's easiest to remove the cached image and let the build process pull it down for you.
In order to see local images, from the command line:
docker images
If you see microsoft/aspnetcore:2.0, then remove the image from your local cache:
docker rmi microsoft/aspnetcore:2.0
After that, when you next build... all is good again.
这篇关于VS 2017和Docker:操作中止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!