-
Notifications
You must be signed in to change notification settings - Fork 20
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
bedc752
commit 597903e
Showing
1 changed file
with
3 additions
and
8 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,22 +1,17 @@ | ||
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. | ||
|
||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base | ||
WORKDIR /app | ||
EXPOSE 80 | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
WORKDIR /src | ||
COPY ["SC.Service/SC.Service.csproj", "SC.Service/"] | ||
RUN dotnet restore "SC.Service/SC.Service.csproj" | ||
COPY . . | ||
WORKDIR "/src/SC.Service" | ||
RUN dotnet build "SC.Service.csproj" -c Release -o /app/build | ||
|
||
FROM build AS publish | ||
RUN dotnet publish "SC.Service.csproj" -c Release -o /app/publish | ||
|
||
FROM base AS final | ||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final | ||
LABEL org.opencontainers.image.source="https://github.com/merschformann/sardine-can" | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
EXPOSE 80 | ||
COPY --from=build /app/publish . | ||
ENTRYPOINT ["dotnet", "SC.Service.dll"] |