I有しdotnet new web -o foo
によって生成された.NETコアウェブアプリケーション、および以下の(多段)Dockerfile
:ドッカー多段コア2.0が原因DLLを行方不明の失敗.NETで構築:S
FROM microsoft/dotnet:2.0-sdk AS builder
WORKDIR /build
COPY ./foo/foo.csproj .
RUN dotnet restore
COPY ./foo/*.cs ./
RUN dotnet publish --configuration Release --output ./app
FROM microsoft/dotnet:2.0-runtime
WORKDIR /app
COPY --from=builder /build/app/* ./
ENTRYPOINT ["dotnet", "./foo.dll"]
ビルイメージは正常に動作しますが、実行しません。
PS> docker build . -t foo
# ...
Successfully built <hash>
Successfully tagged foo:latest
PS> docker run --rm foo
Error:
An assembly specified in the application dependencies manifest (foo.deps.json) was not found:
package: 'Microsoft.ApplicationInsights.AspNetCore', version: '2.1.1'
path: 'lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll'
This assembly was expected to be in the local runtime store as the application was published using the following target manifest files:
aspnetcore-store-2.0.0-linux-x64.xml;aspnetcore-store-2.0.0-osx-x64.xml;aspnetcore-store-2.0.0-win7-x64.xml;aspnetcore-store-2.0.0-win7-x86.xml
すべての必須アセットが出力ディレクトリに公開されているとは限りません。私はこの仕事をするために何をする必要がありますか?