I'm constructing a docker container from a Dotnet Core 2.0 WebApp that was packaged with dotnet publish
, but publishing this way doesn't copy the extensions in Microsoft.EntityFrameworkCore.Tools.DotNet
that enable the dotnet-ef
command.
Specifically, I want to run dotnet ef
commands in the container, but I get this error:
No executable found matching command "dotnet-ef"
My .csproj file contains this, so dotnet-ef
works fine on the host:
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="2.0.0" />
Is there a way to run migrations from a dotnet app that's been packaged with dotnet publish
?