23 lines
781 B
Docker
23 lines
781 B
Docker
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
|
WORKDIR /app
|
|
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
|
|
EXPOSE 80
|
|
EXPOSE 443
|
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
|
WORKDIR /src
|
|
COPY . .
|
|
|
|
RUN dotnet nuget add source -n "musk.fun.nocr" "https://gitea.musk.fun/api/packages/nocr/nuget/index.json"
|
|
RUN dotnet restore "src/Nocr.TelegramListener.Host/Nocr.TelegramListener.Host.csproj"
|
|
WORKDIR "/src/src/Nocr.TelegramListener.Host"
|
|
RUN dotnet build "Nocr.TelegramListener.Host.csproj" -c Release -o /app/build
|
|
|
|
FROM build AS publish
|
|
RUN dotnet publish "Nocr.TelegramListener.Host.csproj" -c Release -o /app/publish
|
|
|
|
FROM base AS final
|
|
WORKDIR /app
|
|
COPY --from=publish /app/publish .
|
|
ENTRYPOINT ["dotnet", "Nocr.TelegramListener.Host.dll"]
|