-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from Star-Academy/refactor/dockerfiles
fix: fix some bugs in dockerfiles
- Loading branch information
Showing
2 changed files
with
8 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
# Use the .NET SDK image as the base image | ||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
|
||
# Set the working directory inside the container | ||
|
||
WORKDIR /app | ||
|
||
RUN dotnet tool install --global dotnet-ef | ||
|
||
# Ensure the global tools are in the PATH | ||
|
||
ENV PATH="$PATH:/root/.dotnet/tools" | ||
|
||
# Copy the project files into the container | ||
|
||
COPY . . | ||
|
||
|
||
# Run the EF database update command directly | ||
CMD ["dotnet", "ef", "database", "update", "--project", "src/Infrastructure/Infrastructure.csproj", "--startup-project", "src/Web/Web.csproj"] |