Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Including Entity Framework tooling in docker container

I am using the aspnetcore docker image to run an ASP.NET Core application using EF Core. Running the application works, but I am unable to use any tooling.

Commands like dotnet ef database update fail.

Is it possible to run any DotNetCliToolReference tooling without the full SDK?

like image 950
Giffesnaffen Avatar asked Jan 02 '23 20:01

Giffesnaffen


1 Answers

Is it possible to run any DotNetCliToolReference tooling without the full SDK?

No. The logic to execute these tools lives in the SDK.

But, if you run this with --verbose on a machine with the SDK you'll see a line that looks like this:

dotnet exec ... ef.dll ...

You can run that command inside the container.

like image 184
bricelam Avatar answered Jan 08 '23 19:01

bricelam