bottestbug/Dockerfile
2025-03-22 00:26:43 +07:00

23 lines
730 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Стартуем с образа .NET
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
# Используем SDK для сборки приложения
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["ТГ бот/ТГ бот.csproj", "ТГ бот/"]
RUN dotnet restore "ТГ бот/ТГ бот.csproj"
COPY . .
WORKDIR "/src/ТГ бот"
RUN dotnet build "ТГ бот.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "ТГ бот.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
COPY appsettings.json /app/ # Копируем файл конфигурации
ENTRYPOINT ["dotnet", "ТГ бот.dll"]