Skip to content

Commit

Permalink
FIX - added the step of adding entity framework code-first DB migrati…
Browse files Browse the repository at this point in the history
…ons so that they can be used to create/update the DB (if needed) each time the Docker container based on the image runs.
  • Loading branch information
Nomi committed Mar 22, 2024
1 parent e586858 commit a9948ac
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ WORKDIR /source/TripPlannerAPI
# Placing it here allows the previous steps to be cached across architectures.
ARG TARGETARCH

# Run Entity Framework Core migrations
RUN dotnet tool install --global dotnet-ef --version 7.0.17
#RUN find / -name dotnet-ef -type f
#RUN dotnet tool list --global
RUN /root/.dotnet/tools/dotnet-ef migrations add initial12121

# Build the application.
# Leverage a cache mount to /root/.nuget/packages so that subsequent builds don't have to re-download packages.
# If TARGETARCH is "amd64", replace it with "x64" - "x64" is .NET's canonical name for this and "amd64" doesn't
Expand Down

0 comments on commit a9948ac

Please sign in to comment.