-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker initcontainer #692
base: main
Are you sure you want to change the base?
Docker initcontainer #692
Conversation
RUN ["tdnf", "install", "-y", "mssql-tools18"] | ||
RUN ["tdnf", "clean", "all"] | ||
### Entity Framework: Migration Builder ### | ||
FROM build AS efbuilder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This efbuilder stage should be entirely independent to the build stage so it doesn't need to be re-run when an unrelated file changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I understand it, the EF migration bundle command relies on the dotnet restore and build stage to have completed first. Allowing EF Builder to inherit the docker layer means it only has to be done once.
If we do not use the EF Migration bundle and instead just use the SQL Script file then we can likely refactor this to make it leaner
6f5b663
to
f93bbd3
Compare
* This entrypoint script will run both the academies db and the fiat db migrations using EF
* Generated an executable Entity Framework migration bundle that can be run as a standalone container
* This means we can build and test both the final runtime image but also the EF migration image used in the initContainer
f3ffd81
to
4bf8547
Compare
Quality Gate passedIssues Measures |
Adds a new stage to the Dockerfile which allows us to isolate the Entity Framework database migrations.
When the
initcontainer
stage is built independently, it will allow us to run the EF migrations as an initContainer for the main web app