-
Notifications
You must be signed in to change notification settings - Fork 0
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
eb795e4
commit 46c0b75
Showing
1 changed file
with
27 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base | ||
WORKDIR /app | ||
EXPOSE 80 | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:5.0.202 AS build | ||
WORKDIR /src | ||
COPY . . | ||
RUN dotnet tool restore | ||
ENV PATH="/root/.dotnet/tools:${PATH}" | ||
|
||
WORKDIR /src/src/DevNews.WebApp | ||
RUN dotnet paket restore | ||
RUN dotnet restore -nowarn:msb3202,nu1503 | ||
RUN dotnet build -c Release -o /app | ||
|
||
FROM build as unittests | ||
WORKDIR /src/tests/DevNews.Core.UnitTests | ||
RUN dotnet restore -nowarn:msb3202,nu1503 | ||
RUN dotnet run | ||
|
||
FROM build AS publish | ||
RUN dotnet publish --no-restore -c Release -o /app | ||
|
||
FROM base AS final | ||
WORKDIR /app | ||
COPY --from=publish /app . | ||
ENTRYPOINT ["dotnet", "DevNews.WebApp.dll" ] |