I have asp.net core web API project with entityframework ORM connecting to localdb. API works fine if I publish it and run locally. But if I move the published code to a linux container, the API is up and running but it cannot create localdb connection throwing the following error.
System.PlatformNotSupportedException: LocalDB is not supported on this platform.
My DokerFile looks like this:
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
COPY bin/Release/netcoreapp2.2/publish .
FROM base AS final
WORKDIR /app
ENTRYPOINT ["dotnet","MyWebApi.dll"]
Am I missing anything related to mssql. I am very new to docker stuff.