我将应用程序从.NET Core 1.0升级到1.1.在这个过程中,dotnet构建命令使用.csproj项目文件启动,所以我摆脱了旧的project.json文件.一切都很好,直到我尝试运行docker build命令:
docker build -t sample.
当它到达Dockerfile中的RUN ["dotnet","build"]命令时,我收到一个错误:
Sending build context to Docker daemon 3.418 MB
Step 1 : FROM microsoft/dotnet:latest
---> 3693707d4f7f
Step 2 : COPY . /app
---> 771e2b035ea1
Removing intermediate container c271f962518e
Step 3 : WORKDIR /app
---> Running in 6a07c60bab1d
---> e819bc2a9e25
Removing intermediate container 6a07c60bab1d
Step 4 : RUN dotnet restore
---> Running in 99d1cf514fa3
warn : The folder '/app' does not contain a project to restore.
---> cf063f4db808
Removing intermediate container 99d1cf514fa3 …Run Code Online (Sandbox Code Playgroud)