I developed the application in asp.net-core 2.0 preview1. I developed for Windows with Visual Studio 2017.
Now I want to deploy it to a Linux server using Docker.
I created a Docker file:
FROM microsoft/aspnetcore:2.0 ARG source WORKDIR /app EXPOSE 44305 COPY ${source:-obj/Docker/publish} . ENTRYPOINT ["dotnet", "Aplication.dll"]
After executing the following commands:
dotnet build -o obj/Docker/publish -c Release dotnet publish -o obj/Docker/publish -c Release docker build -t testapi-api . docker run -p 44305:80
Afer last run command. I get the following error:
An assembly specified in the application dependencies manifest (Aplication.deps.json) was not found: package: 'Microsoft.AspNetCore.Antiforgery', version: '2.0.0-preview1-final' path: 'lib/netcoreapp2.0/Microsoft.AspNetCore.Antiforgery.dll' This assembly was expected to be in the local runtime store as the application was published using the following target manifest files: manifest.win7-x64.xml;manifest.win7-x86.xml;manifest.osx-x64.xml;manifest.linux-x64.xml
I am new to asp.net-core and especially with Docker. So any help with this is wonderful.
c # docker dockerfile asp.net-core
carpics
source share