How does EFCore Migrations work for actual deployment?

So I understand that when locally developing I can do
Add-Migration
Update-Database


and that I can even start the initial migration on startup via ApplicationDbContext.Database.Migrate but this doesn't seem encouraged in production.

but when say deploying my app as a docker container, how do I exactly run those same commands? Do I do them as part of my dockerfile or dockercompose or something?
Was this page helpful?