-
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.
- Loading branch information
1 parent
1b923f5
commit a37e39b
Showing
1 changed file
with
18 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
FROM mcr.microsoft.com/dotnet/sdk:latest AS build-env | ||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
WORKDIR /app | ||
EXPOSE 80 | ||
EXPOSE 443 | ||
# Copy the csproj and restore all of the nugets | ||
COPY . ./ | ||
RUN dotnet restore ./AnalysisData/AnalysisData.sln | ||
# Copy everything else and build | ||
#COPY . ./ | ||
RUN dotnet publish -c Release -o out ./AnalysisData/AnalysisData.sln | ||
# Build runtime image | ||
FROM mcr.microsoft.com/dotnet/sdk:latest | ||
|
||
COPY ./AnalysisData/ ./ | ||
RUN dotnet restore | ||
COPY . . | ||
|
||
RUN dotnet publish ./AnalysisData/AnalysisData/AnalysisData.csproj -c Release -o out | ||
|
||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime | ||
WORKDIR /app | ||
COPY --from=build-env /app/out . | ||
ENTRYPOINT ["dotnet", "AnalysisData.dll"] | ||
COPY --from=build /app/out ./ | ||
|
||
ENV ASPNETCORE_ENVIRONMENT=Development | ||
#ENV ConnectionStrings__DefaultConnection=Host=db;Database=YourDatabaseName;Username=yourusername;Password=yourpassword | ||
ENV ASPNETCORE_URLS=http://*:80 | ||
EXPOSE 80 | ||
|
||
|
||
# Start the application | ||
ENTRYPOINT ["dotnet", "AnalysisData.dll"] |