© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3w ago•
116 replies
Destination Unknown

Trouble calling migrations in EF with Docker

visual studiointermediateadvanced
Stack: Blazor, Docker with compose, Entity Framework, and Postgres. Visual Studio as IDE

Hello,

As the title says, I have trouble calling my migrations within Docker. I have a solution with in there a Blazor web project and on that project I added orchestration support. The postgres db is correctly connected and the project starts without any issues.

When I want to run the command
dotnet ef database update
dotnet ef database update
I can not simply run this, because of Docker. Therefore, I want to go in the Web container and with a shell/bash run the command in there. In VS I can start Docker through the the play-button which launches everything for me (img)

In the developer powershell I want to access the web app, but when I try to enter;

docker compose exec (or the ID or the name)
docker compose exec (or the ID or the name)
I get the message that the given service isnt running even though it clearly is.

When I do get access to the shell/bash, I try to run
dotnet ef database update
dotnet ef database update
. Only then I get the message that no Dotnet sdk is found?

Can someone provide me insights in how to solve both issues?

Thanks in advance.
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements
Next page

Similar Threads

✅ EF Core migrations with Docker
C#CC# / help
11mo ago
❔ Code in EF Migrations?
C#CC# / help
4y ago
EF Migrations 101
C#CC# / help
3y ago
❔ EF Core migrations
C#CC# / help
4y ago