-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
19 lines (16 loc) · 557 Bytes
/
Dockerfile
File metadata and controls
19 lines (16 loc) · 557 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM mcr.microsoft.com/dotnet/aspnet:7.0-bullseye-slim AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/sdk:7.0-bullseye-slim AS build
WORKDIR /src
COPY ["alternatrr/alternatrr.csproj", "alternatrr/"]
RUN dotnet restore "alternatrr/alternatrr.csproj"
COPY . .
WORKDIR "/src/alternatrr"
RUN dotnet build "alternatrr.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "alternatrr.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "alternatrr.dll"]