我正在尝试使用docker运行ASP .NET Core Web App的示例。这在容器外部构建良好并且运行良好。但是容器中的相同操作失败。
docker run -it -p 8080:80 -v "${pwd}:c:\app" -w "c:\app" microsoft/aspnetcore-build
(在容器中)
C:\app>dotnet build
Microsoft (R) Build Engine version 15.7.179.6572 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restoring packages for C:\app\app.csproj...
Restore completed in 215.39 ms for C:\app\app.csproj.
Generating MSBuild file C:\app\obj\app.csproj.nuget.g.props.
**C:\Program Files\dotnet\sdk\2.1.202\NuGet.targets(114,5): error : Access to the path is denied. [C:\app\app.csproj]**
构建失败。