下面是我的Dockerfile。
FROM microsoft/aspnetcore-build as build-image
WORKDIR /home/app
COPY *.sln ./
COPY ./*/*.csproj ./
RUN for file in $(ls *.csproj); do mkdir -p ./${file%.*}/ && mv $file ./${file%.*}/; done
RUN dotnet restore
COPY . .
RUN dotnet publish ./SampleProj -o /publish/
WORKDIR /publish
ENTRYPOINT ["dotnet", "SampleProj.dll"]
我收到错误消息-o / publish /,返回了非零代码:1。