docker 发布 详细报错COPY failed: CreateFile \?\C:\ProgramData\Docker\tmp\docker-builder026231331\WebApplication1\WebApplication1.csproj: The system cannot find the path specified.
解决方法把 dockerFile 文件的问题
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
#Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed.
#For more information, please see https://aka.ms/containercompat
#使用运行时镜像
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
#设定工作目录
WORKDIR /app
#暴露80端口
EXPOSE 80
#EXPOSE 443
#FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
#WORKDIR /src
#COPY [“WebApplication1/WebApplication1.csproj”, “WebApplication1/”]
#RUN dotnet restore “WebApplication1/WebApplication1.csproj”
#把目录下的内容都复制到当前目录下
COPY . .
#WORKDIR “/src/WebApplication1”
#RUN dotnet build “WebApplication1.csproj” -c
#WFROM build AS publish
#RUN dotnet publish “WebApplication1.csproj” -c Release -o /app/publish
#FROM base AS final
#WORKDIR /app
#COPY --from=publish /app/publish .
#运行镜像入口命令和可执行文件名称
ENTRYPOINT [“dotnet”, “WebApplication1.dll”]